Skip to content

Commit

Permalink
Merge bitcoin#544: [Trivial] Add debug info for CWallet::ReconsiderZe…
Browse files Browse the repository at this point in the history
…rocoins().

993fcee Add debug info for CWallet::ReconsiderZerocoins(). (presstab)

Tree-SHA512: 494803e04778eec487ae35e12efd2cf3b5acdc094c98913998563d8386d98142b7525d6703a41dabba10e5126041d56c6ddd61e2130ae6f439d23439b7c6ee2c
  • Loading branch information
Mrs-X committed Feb 22, 2018
2 parents b6a02e9 + 993fcee commit 0065d68
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4837,17 +4837,24 @@ void CWallet::ReconsiderZerocoins(std::list<CZerocoinMint>& listMintsRestored)
return;

for (CZerocoinMint mint : listMints) {
if (IsSerialKnown(mint.GetSerialNumber()))
if (IsSerialKnown(mint.GetSerialNumber())) {
LogPrintf("%s: serial %s is already in the blockchain\n", __func__, mint.GetSerialNumber().GetHex());
continue;
}


uint256 txHash;
if (!GetZerocoinMint(mint.GetValue(), txHash))
if (!GetZerocoinMint(mint.GetValue(), txHash)) {
LogPrintf("%s: did not find pubcoin %s in database\n", __func__, mint.GetValue().GetHex());
continue;
}

uint256 hashBlock = 0;
CTransaction tx;
if (!GetTransaction(txHash, tx, hashBlock))
if (!GetTransaction(txHash, tx, hashBlock)) {
LogPrintf("%s: failed to find transaction %s in blockchain\n", __func__, txHash.GetHex());
continue;
}

mint.SetTxHash(txHash);
mint.SetHeight(mapBlockIndex.at(hashBlock)->nHeight);
Expand Down

0 comments on commit 0065d68

Please sign in to comment.