Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

peer: mruInventoryMap and mruNonceMap implement LRU caches, not MRU #967

Closed
jrick opened this issue Jan 8, 2018 · 4 comments
Closed

peer: mruInventoryMap and mruNonceMap implement LRU caches, not MRU #967

jrick opened this issue Jan 8, 2018 · 4 comments

Comments

@jrick
Copy link
Member

jrick commented Jan 8, 2018

We do want the LRU behavior, so this just requires some file renames and fixing the identifier names and comments.

@davecgh
Copy link
Member

davecgh commented Jan 8, 2018

I agree that they are LRU caches, but the MRU is referring to the maps themselves containing the most recently used entries.

If they were named mruIventoryCache and mruNonceCache, it would be wrong, but that isn't what they're named.

@davecgh
Copy link
Member

davecgh commented Jan 8, 2018

To follow up, I don't have any particular objections to them being renamed to lruInventoryCache and lruNonceCache if people think it would avoid confusion, so long as all of the comments and file names are updated accordingly. The only thing I would say there is it seems like a lot of churn for little benefit.

@randomshinichi
Copy link
Contributor

May I do this? That's assuming you still want this... I'm new to the codebase and I think this might take me on a nice tour.

@davecgh
Copy link
Member

davecgh commented Jan 9, 2018

As discussed in dev channel, @randomshinichi will be taking this.

randomshinichi added a commit to randomshinichi/dcrd that referenced this issue Jan 18, 2018
randomshinichi added a commit to randomshinichi/dcrd that referenced this issue Jan 18, 2018
randomshinichi added a commit to randomshinichi/dcrd that referenced this issue Jan 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants