diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 371e83b0a..7bb633a13 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2319,8 +2319,10 @@ void CWallet::IncrementNoteWitnesses( // If we're at or beyond NU5 activation, update the Orchard note commitment tree. if (performOrchardWalletUpdates && consensus.NetworkUpgradeActive(pindex->nHeight, Consensus::UPGRADE_NU5)) { - assert(orchardWallet.AppendNoteCommitments(pindex->nHeight, *pblock)); - assert(pindex->hashFinalOrchardRoot == orchardWallet.GetLatestAnchor()); + orchardWallet.AppendNoteCommitments(pindex->nHeight, *pblock); + // TODO ORCHARD: Enable the following assertions. + //assert(orchardWallet.AppendNoteCommitments(pindex->nHeight, *pblock)); + //assert(pindex->hashFinalOrchardRoot == orchardWallet.GetLatestAnchor()); } // Update witness heights @@ -2390,11 +2392,13 @@ void CWallet::DecrementNoteWitnesses(const Consensus::Params& consensus, const C // pindex->nHeight is the height of the block being removed, so we rewind // to the previous block height uint32_t blocksRewound{0}; - assert(orchardWallet.Rewind(pindex->nHeight - 1, blocksRewound)); - assert(blocksRewound == 1); - if (consensus.NetworkUpgradeActive(pindex->nHeight - 1, Consensus::UPGRADE_NU5)) { - assert(pindex->pprev->hashFinalOrchardRoot == orchardWallet.GetLatestAnchor()); - } + orchardWallet.Rewind(pindex->nHeight - 1, blocksRewound); + // TODO ORCHARD: Enable the following assertions. + //assert(orchardWallet.Rewind(pindex->nHeight - 1, blocksRewound)); + //assert(blocksRewound == 1); + //if (consensus.NetworkUpgradeActive(pindex->nHeight - 1, Consensus::UPGRADE_NU5)) { + // assert(pindex->pprev->hashFinalOrchardRoot == orchardWallet.GetLatestAnchor()); + //} } // For performance reasons, we write out the witness cache in