test: Add test for IPC serialization bug

Add regression test for serialization bug in IPC mining code that is not
currently being called anywhere reported:

https://github.com/Sjors/bitcoin/issues/71
https://github.com/chaincodelabs/libmultiprocess/issues/122
This commit is contained in:
Ryan Ofsky
2025-01-24 19:01:49 -05:00
parent 2221c8814d
commit 4e0aa1835b
3 changed files with 7 additions and 0 deletions

View File

@@ -121,6 +121,10 @@ void IpcPipeTest()
BOOST_CHECK_EQUAL(bs3.GetRejectReason(), bs4.GetRejectReason());
BOOST_CHECK_EQUAL(bs3.GetDebugMessage(), bs4.GetDebugMessage());
auto script1{CScript() << OP_11};
auto script2{foo->passScript(script1)};
BOOST_CHECK_EQUAL(HexStr(script1), HexStr(script2));
// Test cleanup: disconnect pipe and join thread
disconnect_client();
thread.join();