From b14070d15bc41edcd2f77e15b33e4b8b4da9055e Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 15 Feb 2024 10:06:37 -0500 Subject: [PATCH] Overwinter+sapling consensus rules do not apply to height=0 --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 9d0125698..4236e3571 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1220,8 +1220,8 @@ bool ContextualCheckTransaction(int32_t slowflag,const CBlock *block, CBlockInde const int dosLevel, bool (*isInitBlockDownload)(),int32_t validateprices) { - const bool overwinterActive = true; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER); - const bool saplingActive = true; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING); + const bool overwinterActive = nHeight >=1 ? true : false; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_OVERWINTER); + const bool saplingActive = nHeight >=1 ? true : false; //NetworkUpgradeActive(nHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING); const bool isSprout = false; //!overwinterActive; // If Sprout rules apply, reject transactions which are intended for Overwinter and beyond