Skip to content

Commit

Permalink
Merge bitcoin#610: [Main] Check whether tx is in chain in ContextualC…
Browse files Browse the repository at this point in the history
…heckZerocoinMint().

c4141aa Check whether tx is in chain in ContextualCheckZerocoinMint(). (presstab)

Tree-SHA512: 6536bb9b49ae8548b8ce4840df87a0d1384b50bfca669eedffd541838345c476e166a62aa89d4022e306822bb2063bc9e509347fdd366aaa1a9a62e434b84e35
  • Loading branch information
presstab committed May 14, 2018
2 parents a602d00 + c4141aa commit 6c3bc8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,8 @@ bool ContextualCheckZerocoinMint(const CTransaction& tx, const PublicCoin& coin,
if (pindex->nHeight >= Params().Zerocoin_Block_V2_Start() && Params().NetworkID() != CBaseChainParams::TESTNET) {
//See if this coin has already been added to the blockchain
uint256 txid;
if(zerocoinDB->ReadCoinMint(coin.getValue(), txid))
int nHeight;
if (zerocoinDB->ReadCoinMint(coin.getValue(), txid) && IsTransactionInChain(txid, nHeight))
return error("%s: pubcoin %s was already accumulated in tx %s", __func__,
coin.getValue().GetHex().substr(0, 10),
txid.GetHex());
Expand Down

0 comments on commit 6c3bc8c

Please sign in to comment.