Skip to content

fix sync panic #1736

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

Merged
merged 4 commits into from
Jul 20, 2023
Merged

fix sync panic #1736

merged 4 commits into from
Jul 20, 2023

Conversation

danlaine
Copy link

Why this should be merged

Fixes a panic.

How this works

See comment in code.

How this was tested

Running merkledb-tester while depending on the new code never panics.

@danlaine danlaine added bug Something isn't working merkledb labels Jul 19, 2023
@danlaine danlaine self-assigned this Jul 19, 2023
Copy link
Contributor

@dboehm-avalabs dboehm-avalabs left a comment

Choose a reason for hiding this comment

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

Could also add a check for the end if you wanted. It isn't strictly needed, but when mid == end then you have [start, end and [end, end] which is kind of pointless. Of course the check to see if mid == end might be more expensive than it is worth so ::shrug::

@danlaine
Copy link
Author

Could also add a check for the end if you wanted. It isn't strictly needed, but when mid == end then you have [start, end and [end, end] which is kind of pointless. Of course the check to see if mid == end might be more expensive than it is worth so 🤷

added

@danlaine danlaine mentioned this pull request Jul 20, 2023
@StephenButtolph StephenButtolph added this to the v1.10.6 milestone Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working merkledb
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants