-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Secondary mechanism to trigger watches for transactions from past blo…
…cks (#3002) When a new block is found, we want to check its confirmed transactions to potentially trigger watches. This is especially important when a channel is spent and we haven't seen the spending transaction in our mempool before receiving it in a block. This is already supposed to be handled through the ZMQ `rawtx` topic, where bitcoind should send us every transaction it receives (either in the mempool or in a block). But when using remote `bitcoind` instances, ZMQ seems to sometimes be unreliable and silently drop some events. That's why we add another mechanism for extra safety, where whenever a new block is found, we fetch the last `N` blocks and re-process their transactions. We keep a cache of the processed blocks to ensure that we don't needlessly re-process them multiple times.
- Loading branch information
Showing
8 changed files
with
144 additions
and
15 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
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
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
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.