forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#31556: validation: Send correct notification during sna…
…pshot completion bc43eca test: add functional test for balance after snapshot completion (Martin Zumsande) 226d03d validation: Send correct notification during snapshot completion (Martin Zumsande) Pull request description: After AssumeUtxo background sync is completed in a `ActivateBestChain()` call, the `GetRole()` function called with `BlockConnected()` returns `ChainstateRole::NORMAL` instead of `ChainstateRole::BACKGROUND` for this chainstate. This would make the wallet (which ignores `BlockConnected` notifications for the background chainstate) process it, change `m_last_block_processed_height` to the (ancient) snapshot height, and display an incorrect balance. Fix this by caching the chainstate role before calling `ActivateBestChainStep()`. Also contains a test for this situation that fails on master. Fixes bitcoin#31546 ACKs for top commit: fjahr: re-ACK bc43eca achow101: ACK bc43eca furszy: Code review ACK bc43eca TheCharlatan: lgtm ACK bc43eca Tree-SHA512: c5db677cf3fbab3a33ec127ec6c27c8812299e8368fd3c986bc34d0e515c4eb256f6104479f27829eefc098197de3af75d64ddca636b6b612900a0e21243e4f2
- Loading branch information
Showing
2 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters