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

blockchain: don't assign header as the best tip on maybeAcceptBlockHeader #237

Conversation

kcalvinalvin
Copy link
Contributor

@kcalvinalvin kcalvinalvin commented Jan 8, 2025

maybeAcceptBlockHeader verified the passed in block header and set it as the best tip on it passing verification. However, since the best tip is used for marking a block that's passed all verification and headers verification isn't complete verification, we remove the code for adding the blockNode as the best tip.

This allows us to use the ProcessBlockHeader code for verification of a header without accepting it as well.

maybeAcceptBlockHeader

maybeAcceptBlockHeader verified the passed in block header and set it as
the best tip on it passing verification. However, since the best tip is
used for marking a block that's passed all verification and headers
verification isn't complete verification, we remove the code for adding
the blockNode as the best tip.

This allows us to use the ProcessBlockHeader code for verification of a
header without accepting it as well.
@kcalvinalvin kcalvinalvin changed the title blockchain: don't assign header as the best tip on blockchain: don't assign header as the best tip on maybeAcceptBlockHeader Jan 8, 2025
@kcalvinalvin kcalvinalvin merged commit 89a0bb3 into utreexo:main Jan 8, 2025
2 checks 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.

1 participant