Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zcash_client_sqlite: Set chain tip to truncation height when truncating
We don't know at truncation time what the latest chain tip is; the chain might have reorged to a shorter heavier chain, or the reorg depth might only be a few blocks. `WalletDb::chain_height` uses the scan queue as its source of truth, so the `Verify` range we add during truncation (to prioritise determining whether the rewind was sufficient) can't extend beyond the block height we know to exist. The next call to `WalletDb::update_chain_tip` will add additional ranges beyond this height, which might include a `Verify` range that ends up merging with the one added during truncation.
- Loading branch information