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

Catch assertion error in height_to_hash() #18667

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

matt-o-how
Copy link
Contributor

Purpose:

Currently get_hash() in block_height_map.py has an assert which can fail and is not caught in the calling height_to_hash() function in blockchain.py.
In this case we should treat it as though we are on a fork that is further ahead than us.

This PR adds in try except condition, a default value, and a log for when this case is hit.

Current Behavior:

Raises the exception.

New Behavior:

Catches, logs and proceeds

@matt-o-how matt-o-how added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant