From 2eee7d5d07df4462a9c38e08bc4ead4885aa0cce Mon Sep 17 00:00:00 2001 From: alex v Date: Thu, 21 Nov 2019 09:13:37 +0100 Subject: [PATCH] add missing txblockhash to ser function --- src/consensus/cfund.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/consensus/cfund.h b/src/consensus/cfund.h index 4e053aa20..5a31e32c9 100644 --- a/src/consensus/cfund.h +++ b/src/consensus/cfund.h @@ -102,8 +102,8 @@ class CPaymentRequest std::string thisMapState = ""; std::string bMapState = ""; - for (auto &it:mapState) thisMapState += it.first.ToString()+","+to_string(it.second); - for (auto &it:b.mapState) bMapState += it.first.ToString()+","+to_string(it.second); + for (auto &it:mapState) thisMapState += it.first.ToString()+":"+to_string(it.second)+","; + for (auto &it:b.mapState) bMapState += it.first.ToString()+":"+to_string(it.second)+","; return nAmount == b.nAmount && thisMapState == bMapState @@ -128,8 +128,8 @@ class CPaymentRequest { std::string thisMapState = ""; std::string bMapState = ""; - for (auto &it:mapState) thisMapState += it.first.ToString()+","+to_string(it.second); - for (auto &it:b.mapState) bMapState += it.first.ToString()+","+to_string(it.second); + for (auto &it:mapState) thisMapState += it.first.ToString()+":"+to_string(it.second)+","; + for (auto &it:b.mapState) bMapState += it.first.ToString()+":"+to_string(it.second)+","; thisMapState.pop_back(); bMapState.pop_back(); ret += strprintf("mapState: %d => %d, ", thisMapState, bMapState); @@ -224,6 +224,7 @@ class CPaymentRequest READWRITE(nVotesNo); READWRITE(hash); READWRITE(proposalhash); + READWRITE(txblockhash); READWRITE(strDZeel); // Version-based read/write @@ -294,8 +295,8 @@ class CProposal std::string thisMapState = ""; std::string bMapState = ""; - for (auto &it:mapState) thisMapState += it.first.ToString()+","+to_string(it.second); - for (auto &it:b.mapState) bMapState += it.first.ToString()+","+to_string(it.second); + for (auto &it:mapState) thisMapState += it.first.ToString()+":"+to_string(it.second)+","; + for (auto &it:b.mapState) bMapState += it.first.ToString()+":"+to_string(it.second)+","; return nAmount == b.nAmount && nFee == b.nFee @@ -322,8 +323,8 @@ class CProposal { std::string thisMapState = ""; std::string bMapState = ""; - for (auto &it:mapState) thisMapState += it.first.ToString()+","+to_string(it.second); - for (auto &it:b.mapState) bMapState += it.first.ToString()+","+to_string(it.second); + for (auto &it:mapState) thisMapState += it.first.ToString()+":"+to_string(it.second)+","; + for (auto &it:b.mapState) bMapState += it.first.ToString()+":"+to_string(it.second)+","; thisMapState.pop_back(); bMapState.pop_back(); ret += strprintf("mapState: %d => %d, ", thisMapState, bMapState);