forked from btcsuite/btcwallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chain: optimize removal of inputs in mempool
This commit implements a new struct, `cachedInputs`, to provide faster lookup when removing inputs based on a given transaction. Instead of iterating all the inputs to decide whether they should be removed, we now cache `txid -> inputs` so we can update our local mempool faster by iterating much less data.
- Loading branch information
1 parent
68f7e23
commit a2f9224
Showing
2 changed files
with
151 additions
and
28 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