diff --git a/src/evo/cbtx.cpp b/src/evo/cbtx.cpp index a5f8d6b1cde31..48baccd9d967a 100644 --- a/src/evo/cbtx.cpp +++ b/src/evo/cbtx.cpp @@ -454,6 +454,11 @@ std::optional GetCoinbaseTx(const CBlockIndex* pindex) return std::nullopt; } + // There's no CbTx before DIP0003 activation + if (!DeploymentActiveAt(*pindex, Params().GetConsensus(), Consensus::DEPLOYMENT_DIP0003)) { + return std::nullopt; + } + CBlock block; if (!ReadBlockFromDisk(block, pindex, Params().GetConsensus())) { return std::nullopt;