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

Minor Optimization: Keep track of recently rejected transactions #221

Open
davecgh opened this issue Jan 12, 2015 · 1 comment
Open

Minor Optimization: Keep track of recently rejected transactions #221

davecgh opened this issue Jan 12, 2015 · 1 comment

Comments

@davecgh
Copy link
Member

davecgh commented Jan 12, 2015

Currently, when a transaction is rejected, it simply responds to the peer with the appropriate reject message and does not keep track of the fact it has been rejected. This behavior is accurate, but it could be optimized by keeping track of recently-rejected transactions since the same transaction might be coming from multiple peers if it was rejected for being considered non-standard as opposed to being invalid.

By keeping a small map of recently rejected transactions along with the reject reason/message, there would only need to be one database lookup and associated validation even if the same transaction shows up from multiple peers. This map would obviously need to be size-limited and provide random eviction and replacement once the limit is reached (just like the existing mruinvmap).

@dajohi
Copy link
Member

dajohi commented Nov 4, 2016

I think this can be closed @davecgh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants