diff options
author | instagibbs <gsanders87@gmail.com> | 2016-11-22 15:47:07 -0500 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-05 08:11:50 +0100 |
commit | f26dab7e90cfb1733736c1dd63c507254de84a34 (patch) | |
tree | b60b8fb1228367269699e0bd5dd7b9ea8b6559a4 /src/zmq | |
parent | 21ccb9f2530af996fc0a58df418837a08b75781f (diff) |
Adapt ZMQ/rest serialization to take rpcserialversion arg
Github-Pull: #9194
Rebased-From: ad5c4c93cae53a2a6f74880ca11b4d788677a378
Diffstat (limited to 'src/zmq')
-rw-r--r-- | src/zmq/zmqpublishnotifier.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp index b6c907980f..cdef17e08c 100644 --- a/src/zmq/zmqpublishnotifier.cpp +++ b/src/zmq/zmqpublishnotifier.cpp @@ -6,6 +6,7 @@ #include "zmqpublishnotifier.h" #include "main.h" #include "util.h" +#include "rpc/server.h" static std::multimap<std::string, CZMQAbstractPublishNotifier*> mapPublishNotifiers; @@ -165,7 +166,7 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex) LogPrint("zmq", "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex()); const Consensus::Params& consensusParams = Params().GetConsensus(); - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); + CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags()); { LOCK(cs_main); CBlock block; @@ -185,7 +186,7 @@ bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr { uint256 hash = transaction.GetHash(); LogPrint("zmq", "zmq: Publish rawtx %s\n", hash.GetHex()); - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); + CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags()); ss << transaction; return SendMessage(MSG_RAWTX, &(*ss.begin()), ss.size()); } |