Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btc spv: give wallet precedence for block notifications
When a wallet is able to provide block notifications, allow wallet notifications to take precedence. Queue polled new tips for 10 seconds, canceling their broadcast and sending the notification earlier if the wallet notification comes during this window. If the wallet note doesn't come by 10 seconds, send the queued notification and log a warning. SPV tip updates are provided by the FilteredBlockConnected notification, which can come after neutrino stores the block header(s). Care is taken not to spam the caller with notifications, since they are not limited by the polling frequency. The same mechanism for limiting spam is used to solve the non-existent wallet error messages for *Core though, so you get two for the price of one with that solution.
- Loading branch information
Showing
9 changed files
with
331 additions
and
88 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
Oops, something went wrong.