Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

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

Closed

Conversation

minh-bq
Copy link
Collaborator

@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
@minh-bq minh-bq closed this by deleting the head repository Feb 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant