Skip to content

Commit 2708b6f

Browse files
committed
[Consensus] Disable zerocoin minting in contextual check
1 parent 9f3fa2a commit 2708b6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,11 @@ bool CheckZerocoinMint(const uint256& txHash, const CTxOut& txout, CValidationSt
967967

968968
bool ContextualCheckZerocoinMint(const CTransaction& tx, const PublicCoin& coin, const CBlockIndex* pindex)
969969
{
970+
if (pindex->nHeight > Params().Zerocoin_Block_EndFakeSerial() && Params().NetworkID() != CBaseChainParams::TESTNET) {
971+
// Zerocoin MINTs have been disabled
972+
return error("%s: Mints disabled at height %d - unable to add pubcoin %s", __func__,
973+
pindex->nHeight, coin.getValue().GetHex().substr(0, 10));
974+
}
970975
if (pindex->nHeight >= Params().Zerocoin_Block_V2_Start() && Params().NetworkID() != CBaseChainParams::TESTNET) {
971976
//See if this coin has already been added to the blockchain
972977
uint256 txid;

0 commit comments

Comments
 (0)