mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 09:43:55 +02:00
multiprocess: Add serialization code for vector<char>
This commit is contained in:
@@ -16,4 +16,5 @@ interface FooInterface $Proxy.wrap("FooImplementation") {
|
||||
passOutPoint @1 (arg :Data) -> (result :Data);
|
||||
passUniValue @2 (arg :Text) -> (result :Text);
|
||||
passTransaction @3 (arg :Data) -> (result :Data);
|
||||
passVectorChar @4 (arg :Data) -> (result :Data);
|
||||
}
|
||||
|
||||
@@ -97,6 +97,10 @@ void IpcPipeTest()
|
||||
CTransactionRef tx2{foo->passTransaction(tx1)};
|
||||
BOOST_CHECK(*Assert(tx1) == *Assert(tx2));
|
||||
|
||||
std::vector<char> vec1{'H', 'e', 'l', 'l', 'o'};
|
||||
std::vector<char> vec2{foo->passVectorChar(vec1)};
|
||||
BOOST_CHECK_EQUAL(std::string_view(vec1.begin(), vec1.end()), std::string_view(vec2.begin(), vec2.end()));
|
||||
|
||||
// Test cleanup: disconnect pipe and join thread
|
||||
disconnect_client();
|
||||
thread.join();
|
||||
|
||||
@@ -16,6 +16,7 @@ public:
|
||||
COutPoint passOutPoint(COutPoint o) { return o; }
|
||||
UniValue passUniValue(UniValue v) { return v; }
|
||||
CTransactionRef passTransaction(CTransactionRef t) { return t; }
|
||||
std::vector<char> passVectorChar(std::vector<char> v) { return v; }
|
||||
};
|
||||
|
||||
void IpcPipeTest();
|
||||
|
||||
Reference in New Issue
Block a user