zcash_client_sqlite: Ensure that truncation is applied to the Orchard note commitment tree.

This commit is contained in:
Kris Nuttycombe 2024-03-12 10:01:49 -06:00
parent d68a01a221
commit 2eb5061eb1
1 changed files with 4 additions and 0 deletions

View File

@ -1805,6 +1805,10 @@ pub(crate) fn truncate_to_height<P: consensus::Parameters>(
wdb.with_sapling_tree_mut(|tree| {
tree.truncate_removing_checkpoint(&block_height).map(|_| ())
})?;
#[cfg(feature = "orchard")]
wdb.with_orchard_tree_mut(|tree| {
tree.truncate_removing_checkpoint(&block_height).map(|_| ())
})?;
// Rewind received notes
conn.execute(