From 0f99a6ea3f28d81d069defcdc5e870e1f82849e2 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 7 Mar 2020 17:28:35 -0500 Subject: [PATCH] Port Network upgrade detection back to our KMD flavor --- src/validationinterface.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index 802b8b75c..1c2d39495 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -146,10 +146,8 @@ void ThreadNotifyWallets(CBlockIndex *pindexLastTip) // the Sapling activation height. Otherwise, the last anchor was the // empty root. SaplingMerkleTree oldSaplingTree; - if (chainParams.GetConsensus().NetworkUpgradeActive( - pindex->pprev->GetHeight(), Consensus::UPGRADE_SAPLING)) { - assert(pcoinsTip->GetSaplingAnchorAt( - pindex->pprev->hashFinalSaplingRoot, oldSaplingTree)); + if (NetworkUpgradeActive(pindex->pprev->GetHeight(),Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) { + assert(pcoinsTip->GetSaplingAnchorAt(pindex->pprev->hashFinalSaplingRoot, oldSaplingTree)); } else { assert(pcoinsTip->GetSaplingAnchorAt(SaplingMerkleTree::empty_root(), oldSaplingTree)); }