From 4270cfc0f7ce851d502dc378332eee332bc19c23 Mon Sep 17 00:00:00 2001 From: miketout Date: Wed, 15 Mar 2023 22:40:10 -0700 Subject: [PATCH] Ethereum notarization fix --- src/pbaas/notarization.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pbaas/notarization.cpp b/src/pbaas/notarization.cpp index e9378d3916b..629517fd6db 100644 --- a/src/pbaas/notarization.cpp +++ b/src/pbaas/notarization.cpp @@ -1650,6 +1650,10 @@ CChainNotarizationData::CChainNotarizationData(UniValue &obj, (pbn = CPBaaSNotarization(p.vData[0])).IsValid()) { notarizationUni = pbn.ToUniValue(); + if (pBlockHash) + { + pBlockHash->push_back(blockHash); + } } else { @@ -1663,16 +1667,16 @@ CChainNotarizationData::CChainNotarizationData(UniValue &obj, return; } } - - vtx.push_back(make_pair(CUTXORef(uint256S(uni_get_str(find_value(o, "txid"))), - uni_get_int(find_value(o, "vout"))), - CPBaaSNotarization(notarizationUni))); - if (pBlockHash) + else if (pBlockHash) { uint256 blockHash; blockHash.SetHex(uni_get_str(find_value(o, "blockhash"))); pBlockHash->push_back(blockHash); } + + vtx.push_back(make_pair(CUTXORef(uint256S(uni_get_str(find_value(o, "txid"))), + uni_get_int(find_value(o, "vout"))), + CPBaaSNotarization(notarizationUni))); if (pEvidence) { pEvidence->resize(pEvidence->size() + 1);