Remove assertions that require Orchard wallet persistence to satisfy.
This commit is contained in:
parent
23a7314607
commit
9336c5e7f0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue