@@ -402,10 +402,6 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
402402 *pfMissingInputs = false ;
403403
404404 // Check maintenance mode
405- bool hasTxZerocoins = tx.ContainsZerocoins ();
406- if (sporkManager.IsSporkActive (SPORK_16_ZEROCOIN_MAINTENANCE_MODE) && hasTxZerocoins)
407- return state.DoS (10 , error (" %s : Zerocoin transactions are temporarily disabled for maintenance" ,
408- __func__), REJECT_INVALID, " bad-tx-zerocoin-maintenance" );
409405 if (sporkManager.IsSporkActive (SPORK_20_SAPLING_MAINTENANCE) && tx.IsShieldedTx ())
410406 return state.DoS (10 , error (" %s : Shielded transactions are temporarily disabled for maintenance" ,
411407 __func__), REJECT_INVALID, " bad-tx-sapling-maintenance" );
@@ -415,7 +411,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C
415411 int chainHeight = chainActive.Height ();
416412
417413 // Zerocoin txes are not longer accepted in the mempool.
418- if (hasTxZerocoins ) {
414+ if (tx. ContainsZerocoins () ) {
419415 return state.DoS (100 , error (" %s : v5 upgrade enforced, zerocoin disabled" , __func__),
420416 REJECT_INVALID, " bad-tx-with-zc" );
421417 }
@@ -1539,7 +1535,6 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
15391535 std::vector<PrecomputedTransactionData> precomTxData;
15401536 precomTxData.reserve (block.vtx .size ()); // Required so that pointers to individual precomTxData don't get invalidated
15411537 bool fInitialBlockDownload = IsInitialBlockDownload ();
1542- bool fZerocoinMaintenance = (block.nTime > sporkManager.GetSporkValue (SPORK_16_ZEROCOIN_MAINTENANCE_MODE));
15431538 bool fSaplingMaintenance = (block.nTime > sporkManager.GetSporkValue (SPORK_20_SAPLING_MAINTENANCE));
15441539 for (unsigned int i = 0 ; i < block.vtx .size (); i++) {
15451540 const CTransaction& tx = *block.vtx [i];
@@ -1550,11 +1545,8 @@ static bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockInd
15501545 return state.DoS (100 , error (" ConnectBlock() : too many sigops" ), REJECT_INVALID, " bad-blk-sigops" );
15511546
15521547 // Check maintenance mode
1553- if (!fInitialBlockDownload ) {
1554- if (fZerocoinMaintenance && tx.ContainsZerocoins ())
1555- return state.DoS (100 , error (" %s : zerocoin transactions are currently in maintenance mode" , __func__));
1556- if (fSaplingMaintenance && tx.IsShieldedTx ())
1557- return state.DoS (100 , error (" %s : shielded transactions are currently in maintenance mode" , __func__));
1548+ if (!fInitialBlockDownload && fSaplingMaintenance && tx.IsShieldedTx ()) {
1549+ return state.DoS (100 , error (" %s : shielded transactions are currently in maintenance mode" , __func__));
15581550 }
15591551
15601552 // If v5 is active, bye bye zerocoin
0 commit comments