Skip to content

Commit fb23601

Browse files
committed
fix: CSimplifiedMNListDiff deser
1 parent aac519f commit fb23601

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/evo/core_write.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
ssCbTxMerkleTree << cbTxMerkleTree;
198198
obj.pushKV("cbTxMerkleTree", HexStr(ssCbTxMerkleTree));
199199

200-
obj.pushKV("cbTx", EncodeHexTx(*cbTx));
200+
obj.pushKV("cbTx", EncodeHexTx(CTransaction(cbTx)));
201201

202202
UniValue deletedMNsArr(UniValue::VARR);
203203
for (const auto& h : deletedMNs) {
@@ -227,7 +227,7 @@
227227
obj.pushKV("newQuorums", newQuorumsArr);
228228

229229
// Do not assert special tx type here since this can be called prior to DIP0003 activation
230-
if (const auto opt_cbTxPayload = GetTxPayload<CCbTx>(*cbTx, /*assert_type=*/false)) {
230+
if (const auto opt_cbTxPayload = GetTxPayload<CCbTx>(cbTx, /*assert_type=*/false)) {
231231
obj.pushKV("merkleRootMNList", opt_cbTxPayload->merkleRootMNList.ToString());
232232
if (opt_cbTxPayload->nVersion >= CCbTx::Version::MERKLE_ROOT_QUORUMS) {
233233
obj.pushKV("merkleRootQuorums", opt_cbTxPayload->merkleRootQuorums.ToString());

src/evo/smldiff.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ bool BuildSimplifiedMNListDiff(CDeterministicMNManager& dmnman, const Chainstate
209209
return false;
210210
}
211211

212-
mnListDiffRet.cbTx = block.vtx[0];
212+
mnListDiffRet.cbTx = CMutableTransaction(*block.vtx[0]);
213213

214214
std::vector<uint256> vHashes;
215215
std::vector<bool> vMatch(block.vtx.size(), false);

src/evo/smldiff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CSimplifiedMNListDiff
4949
uint256 baseBlockHash;
5050
uint256 blockHash;
5151
CPartialMerkleTree cbTxMerkleTree;
52-
CTransactionRef cbTx;
52+
CMutableTransaction cbTx;
5353
std::vector<uint256> deletedMNs;
5454
std::vector<CSimplifiedMNListEntry> mnList;
5555
uint16_t nVersion{CURRENT_VERSION};

0 commit comments

Comments
 (0)