Skip to content

Commit

Permalink
add missing txblockhash to ser function
Browse files Browse the repository at this point in the history
  • Loading branch information
alex v committed Nov 21, 2019
1 parent 29f404d commit 2eee7d5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/consensus/cfund.h
Expand Up @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -224,6 +224,7 @@ class CPaymentRequest
READWRITE(nVotesNo);
READWRITE(hash);
READWRITE(proposalhash);
READWRITE(txblockhash);
READWRITE(strDZeel);

// Version-based read/write
Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 2eee7d5

Please sign in to comment.