Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

node-filter does not use ChainNotify #8231

Merged
merged 2 commits into from
Mar 28, 2018
Merged

Conversation

debris
Copy link
Collaborator

@debris debris commented Mar 27, 2018

No description provided.

@debris debris added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Mar 27, 2018
@5chdn 5chdn added this to the 1.11 milestone Mar 27, 2018
Copy link
Contributor

@andresilva andresilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't the cache just keep growing indefinitely now? Plus now it will include duplicate entries for the same NodeId (results at different blocks).

@tomusdrw
Copy link
Collaborator

@andresilva look for LruCache::new(4096) in the constructor. It can include stalled entries, but it's not really that much of an issue IMHO (just potentially wasted memory).

@andresilva
Copy link
Contributor

Derp, I should have realised it with the name LruCache. There's no need to care about stale entries if it's bounded. @debris there's a test that needs fixing (removing a call to clear_cache).

@debris
Copy link
Collaborator Author

debris commented Mar 28, 2018

fixed the test and unfortunately removed 1 assertion from it as it is quite complicated to make it work without writing a lot of boilerplate code

created an issue for that

@debris debris added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 28, 2018
@debris debris merged commit 06a7ca2 into master Mar 28, 2018
@debris debris deleted the node_filter_improvements branch March 28, 2018 02:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants