Do not apply sapling network rules to block height 0 or 1 in ScanForWalletTransactions
This commit is contained in:
@@ -2790,7 +2790,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
|
||||
// This should never fail: we should always be able to get the tree
|
||||
// state on the path to the tip of our chain
|
||||
if (pindex->pprev) {
|
||||
const bool sapling = true;
|
||||
const bool sapling = pindex->GetHeight() >= 2 ? true : false;
|
||||
if (sapling) { // NetworkUpgradeActive(pindex->pprev->GetHeight(), Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) {
|
||||
assert(pcoinsTip->GetSaplingAnchorAt(pindex->pprev->hashFinalSaplingRoot, saplingTree));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user