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

consortium-v2/snapshot: make FindAncientHeader more readable #424

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

minh-bq
Copy link
Contributor

@minh-bq minh-bq commented Mar 25, 2024

This commit refactors FindAncientHeader, changes its name to findAncestorHeader, adds some comments and unit test to make the code more readable.

@minh-bq minh-bq requested review from DNK90, andicrypt and NganSM March 25, 2024 04:06
@minh-bq minh-bq force-pushed the chore/find-checkpoint-header branch from d59d053 to 98103e6 Compare November 14, 2024 06:27
We remove the hash check in FindAncientHeader to make it easier to write unit
test. This is fine because the parents are guaranteed to be ordered and linked
by the check when InsertChain. This is a preparation commit for refactoring this
function.
This commit refactors FindAncientHeader, changes its name to findAncestorHeader,
adds some comments and unit test to make the code more readable.
@minh-bq minh-bq force-pushed the chore/find-checkpoint-header branch 2 times, most recently from 3212b56 to 9e7c9e4 Compare November 14, 2024 07:13
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