Browse Source

Do not apply sapling network rules to block height 0 or 1 in ScanForWalletTransactions

duke
Duke 2 months ago
parent
commit
558f662a33
  1. 2
      src/wallet/wallet.cpp

2
src/wallet/wallet.cpp

@ -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));
}

Loading…
Cancel
Save