-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a cache to house transactions that have recently been advertised to other peers. It makes use of the new container/lru module to handle automatic expiration of entries and maximum entry limiting. The rationale for this change is that it is considered misbehavior to advertise a transaction and then claim it is not found when the corresponding request arrives. Maintaining a separate cache of advertised transactions for a short period of time after they were advertised significantly increases the probability they are available to serve when a request for the advertisement arrives independent of the current status of the unconfirmed transaction mempool.
- Loading branch information
Showing
1 changed file
with
130 additions
and
14 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