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/4721 #4748

Merged
merged 4 commits into from
May 8, 2024
Merged

Fix/4721 #4748

merged 4 commits into from
May 8, 2024

Conversation

jcnelson
Copy link
Member

@jcnelson jcnelson commented May 3, 2024

Fixes #4721 by mandating that a burnchain block header by resolved by a BurnchainHeaderReader, which will resolve a block height to at most one burnchain header.

@jcnelson jcnelson requested review from kantai and obycode May 3, 2024 18:34
@jcnelson jcnelson changed the title chore: use the burnchain indexer to find the right block header Fix/4721 May 3, 2024
obycode
obycode previously approved these changes May 3, 2024
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM! It will be great to get this running against bitcoin testnet and see if it helps handle those reorgs better. Would it be possible to add a test for the bad behavior this is fixing?

Copy link
Member

@kantai kantai left a comment

Choose a reason for hiding this comment

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

This looks good to me, but can you add a regression unit test for this? I think something as simple as injecting some synthetic entries into the indexer and the burnchain db's table would suffice.

@jcnelson
Copy link
Member Author

jcnelson commented May 6, 2024

I have added a unit test

@jcnelson jcnelson requested review from obycode and kantai May 6, 2024 17:07
@jcnelson jcnelson added this pull request to the merge queue May 8, 2024
Merged via the queue into develop with commit 329c27c May 8, 2024
1 check 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.

3 participants