-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit how far we look into the blockchain
If we're unable to find the spending tx in the mempool, we start looking for it in the blockchain. Unfortunately, there are cases where we end up in that code path even though the spending tx is not confirmed: - a timeout on the `getTransaction` call - the spending tx gets dropped from our mempool for some reason - bitcoind is malicious or buggy Fetching the whole blockchain isn't really useful: after enough time has passed, we can be pretty sure that a potential attacker would have claimed the transaction's outputs already and we can't punish them. We limit this to the last month of blockchain data, which should be much larger than our `to_delay`.
- Loading branch information
Showing
2 changed files
with
11 additions
and
6 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