multi: Use new container/lru module.#3360
Merged
davecgh merged 6 commits intodecred:masterfrom Jun 13, 2024
Merged
Conversation
5184989 to
e0450ca
Compare
6f35e11 to
28a2817
Compare
f975d1f to
19f444d
Compare
2211fb9 to
607a7cd
Compare
jrick
approved these changes
Jun 12, 2024
51741bf to
c95a209
Compare
This updates the peer known inventory and sent nonces LRU caches to use the new container/lru module. It also uses the expiration functionality of the new module to impose an expiration time of 15 minutes on the known inventory entries. This will allow the possibility of the cache shrinking over time in periods of low activity versus the current behavior where it will eventually reach the limit and stay there indefinitely.
This updates the blockchain recent blocks and contextual checks LRU caches to use the new container/lru module.
This updates the mining notified parents LRU cache to use the new container/lru module.
This adds the new container/lru module to the multimod go workspace setup script and simultaneously removes the old lru module. It also adds a directive to drop the use of the old lru module from existing go.work files.
c95a209 to
6ac5ab5
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This requires #3359.This consists of a series of commits to update the code to make use of the new
container/lrumodule as well as deprecate and remove the existing interface-basedlrumodule.In addition to being a bit more efficient, it also has the benefit of using the expiration functionality the new module provides to impose an expiration time of 15 minutes on the known inventory entries for peers. This allows the possibility of the cache shrinking over time in periods of low activity versus the current behavior where it will eventually reach the limit and stay there indefinitely.
Each commit is intended to be a self-contained and logically easy to follow change such that the code continues to compile and the tests continue to pass at each step.
See the description of each commit for further details.