diff --git a/src/consensus/tx_verify.cpp b/src/consensus/tx_verify.cpp index 3923957e70..3ff710c679 100644 --- a/src/consensus/tx_verify.cpp +++ b/src/consensus/tx_verify.cpp @@ -181,7 +181,7 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, TxValidationState& state, assert(!coin.IsSpent()); // If prev is coinbase, check that it's matured - if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < COINBASE_MATURITY) { + if (coin.IsCoinBase() && nSpendHeight - coin.nHeight < (coin.nHeight < 145000 ? COINBASE_MATURITY : COINBASE_MATURITY_2)) { return state.Invalid(TxValidationResult::TX_PREMATURE_SPEND, "bad-txns-premature-spend-of-coinbase", strprintf("tried to spend coinbase at depth %d", nSpendHeight - coin.nHeight)); }