-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: check if coin already in cache #1549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC the plus here is that we prevent the user from hitting the network with a tx that's bound to fail, which is great.
I have two concerns, correct me if I'm wrong:
- We might get inconsistent results because of the time based eviction. E.g. user stalls submitting the second transaction long enough for the cache to drop the entry.
- We don't evict when txs are dropped by the node which means we might prevent the user from executing a valid transaction at some point.
^ Had meeting with @segfault-magnet and @MujkicA where we went through the uses cases and we came to the above conclusions. |
Summary
Checks if any of the inputs is already cached before sending/submitting the tx.