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

fix: Iterate pendingWrites backward to get the last updated value #285

Merged

Conversation

pistomat
Copy link
Contributor

@pistomat pistomat commented Nov 12, 2024

📝 Summary

Multiple Store operations in a single CCR append the values to pendingWrites, which makes it sorted by time ascending. When doing a Retrieve the list of pendingWrites was iterated from oldest to newest, which means only the first stored value for a given key was ever returned. This PR iterates over pendingWrites in reverse so the latest stored value is returned.


  • I have seen and agree to CONTRIBUTING.md

Copy link
Contributor

@0x416e746f6e 0x416e746f6e left a comment

Choose a reason for hiding this comment

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

reviewing upon request from Michał

looks good for my rather limited understanding of the problem and underlying code-base

@0x416e746f6e 0x416e746f6e merged commit e96d433 into flashbots:main Nov 14, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants