Do not apply overwinter/sapling consensus rules to block 0

This commit is contained in:
Duke
2024-02-15 10:40:22 -05:00
parent b14070d15b
commit 07b041fd94
7 changed files with 27 additions and 21 deletions

View File

@@ -233,8 +233,8 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
const int nHeight = pindexPrev->GetHeight() + 1;
const Consensus::Params &consensusParams = chainparams.GetConsensus();
uint32_t consensusBranchId = CurrentEpochBranchId(nHeight, consensusParams);
// Sapling NU is always active
const bool sapling = true; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING);
// Sapling NU is always active for height>=1
const bool sapling = nHeight>=1 ? true : false; //NetworkUpgradeActive(nHeight, consensusParams, Consensus::UPGRADE_SAPLING);
const int64_t nMedianTimePast = pindexPrev->GetMedianTimePast();
uint32_t proposedTime = GetTime();