Skip to content

Commit c4141aa

Browse files
committed
Check whether tx is in chain in ContextualCheckZerocoinMint().
1 parent 9985266 commit c4141aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,8 @@ bool ContextualCheckZerocoinMint(const CTransaction& tx, const PublicCoin& coin,
12451245
if (pindex->nHeight >= Params().Zerocoin_Block_V2_Start() && Params().NetworkID() != CBaseChainParams::TESTNET) {
12461246
//See if this coin has already been added to the blockchain
12471247
uint256 txid;
1248-
if(zerocoinDB->ReadCoinMint(coin.getValue(), txid))
1248+
int nHeight;
1249+
if (zerocoinDB->ReadCoinMint(coin.getValue(), txid) && IsTransactionInChain(txid, nHeight))
12491250
return error("%s: pubcoin %s was already accumulated in tx %s", __func__,
12501251
coin.getValue().GetHex().substr(0, 10),
12511252
txid.GetHex());

0 commit comments

Comments
 (0)