diff --git a/src/masternodes/mn_checks.cpp b/src/masternodes/mn_checks.cpp index 03501d4b02e..6ea81ed4f27 100644 --- a/src/masternodes/mn_checks.cpp +++ b/src/masternodes/mn_checks.cpp @@ -255,7 +255,8 @@ class CCustomMetadataParseVisitor : public boost::static_visitor } CDataStream ss(metadata, SER_NETWORK, PROTOCOL_VERSION); - ss >> obj.poolId; + // serialize poolId as raw integer + ss >> obj.poolId.v; ss >> obj.status; ss >> obj.commission; ss >> obj.ownerAddress; diff --git a/src/masternodes/rpc_poolpair.cpp b/src/masternodes/rpc_poolpair.cpp index 217de586644..3044ff79f41 100644 --- a/src/masternodes/rpc_poolpair.cpp +++ b/src/masternodes/rpc_poolpair.cpp @@ -713,7 +713,8 @@ UniValue updatepoolpair(const JSONRPCRequest& request) { CDataStream metadata(DfTxMarker, SER_NETWORK, PROTOCOL_VERSION); metadata << static_cast(CustomTxType::UpdatePoolPair) - << poolId << status << commission << ownerAddress; + // serialize poolId as raw integer + << poolId.v << status << commission << ownerAddress; if (targetHeight >= Params().GetConsensus().ClarkeQuayHeight) { metadata << rewards; @@ -741,7 +742,7 @@ UniValue updatepoolpair(const JSONRPCRequest& request) { CCoinsViewCache coins(&::ChainstateActive().CoinsTip()); if (optAuthTx) AddCoins(coins, *optAuthTx, targetHeight); - auto metadata = ToByteVector(CDataStream{SER_NETWORK, PROTOCOL_VERSION, poolId, status, commission, ownerAddress}); + auto metadata = ToByteVector(CDataStream{SER_NETWORK, PROTOCOL_VERSION, poolId.v, status, commission, ownerAddress}); execTestTx(CTransaction(rawTx), targetHeight, metadata, CUpdatePoolPairMessage{}, coins); } return signsend(rawTx, pwallet, optAuthTx)->GetHash().GetHex();