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

@@ -149,7 +149,7 @@ void ThreadNotifyWallets(CBlockIndex *pindexLastTip)
// the Sapling activation height. Otherwise, the last anchor was the
// empty root.
SaplingMerkleTree oldSaplingTree;
const bool sapling = true;
const bool sapling = pindex->pprev->GetHeight() >= 1 ? true : false;
if (sapling) { // NetworkUpgradeActive(pindex->pprev->GetHeight(),Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) {
assert(pcoinsTip->GetSaplingAnchorAt(pindex->pprev->hashFinalSaplingRoot, oldSaplingTree));
} else {