Skip to content

Commit

Permalink
Add debug info for CWallet::ReconsiderZerocoins().
Browse files Browse the repository at this point in the history
  • Loading branch information
presstab committed Feb 21, 2018
1 parent b6a02e9 commit 993fcee
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/wallet.cpp
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 993fcee

Please sign in to comment.