diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 37b31ec85..18e38cb0c 100644 --- a/src/wallet/wallet.cpp +++ b/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)); }