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

merkledb -- fix hasValue in recordNodeDeleted #2779

Merged
merged 1 commit into from Feb 29, 2024
Merged

Conversation

danlaine
Copy link
Collaborator

In remove, we may call:

nodeToDelete.setValue(maybe.Nothing[[]byte]())

before

recordNodeDeleted(nodeToDelete)

As a result, inside recordNodeDeleted, we always set hadValue to false, even if nodeToDelete used to have a value before we set its value to Nothing.

This PR fixes that by separately passing in hadValue to recordNodeDeleted.

@danlaine danlaine self-assigned this Feb 28, 2024
@danlaine danlaine changed the title fix hasValue in recordNodeDeleted merkledb -- fix hasValue in recordNodeDeleted Feb 28, 2024
@danlaine danlaine added this pull request to the merge queue Feb 29, 2024
Merged via the queue into master with commit 6e0afdc Feb 29, 2024
17 checks passed
@danlaine danlaine deleted the merkledb-audit-l-03 branch February 29, 2024 14:56
mboben pushed a commit to mboben/avalanchego that referenced this pull request Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants