From 2708b6f3bdd8b28bdd20423fec2fc2df366ea413 Mon Sep 17 00:00:00 2001 From: random-zebra Date: Tue, 30 Apr 2019 11:54:20 +0200 Subject: [PATCH] [Consensus] Disable zerocoin minting in contextual check --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index fbc37a767e395..84efeed240e37 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -967,6 +967,11 @@ bool CheckZerocoinMint(const uint256& txHash, const CTxOut& txout, CValidationSt bool ContextualCheckZerocoinMint(const CTransaction& tx, const PublicCoin& coin, const CBlockIndex* pindex) { + if (pindex->nHeight > Params().Zerocoin_Block_EndFakeSerial() && Params().NetworkID() != CBaseChainParams::TESTNET) { + // Zerocoin MINTs have been disabled + return error("%s: Mints disabled at height %d - unable to add pubcoin %s", __func__, + pindex->nHeight, coin.getValue().GetHex().substr(0, 10)); + } 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;