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

Return error from PolkadotTrieImpl::tryGet when failed to retrieve a value #1897

Merged
merged 4 commits into from
Dec 13, 2023

Conversation

Harrm
Copy link
Contributor

@Harrm Harrm commented Dec 11, 2023

Referenced issues

Description of the Change

This situation should not normally occur, so it was processed incorrectly in the code, leading to undefined behavior.

Benefits

Kagome no longer crashes in this case.

Possible Drawbacks

Alternate Designs

std::abort since this indicates that the database is corrupted.

@Harrm Harrm marked this pull request as ready for review December 11, 2023 13:53
@Harrm Harrm enabled auto-merge (squash) December 12, 2023 15:53
@Harrm Harrm merged commit 73558db into master Dec 13, 2023
10 checks passed
@Harrm Harrm deleted the fix/broken_trie_value_error branch December 13, 2023 08:20
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.

3 participants