add comment

This commit is contained in:
Youngjoon Lee 2025-04-01 10:33:14 +09:00
parent 3de396fdfb
commit f3d68211e0
No known key found for this signature in database
GPG Key ID: D94003D91DE12141

View File

@ -99,6 +99,11 @@ def backfill_fork(
def find_disconnected_point(
local: Follower, fork: Generator[BlockHeader, None, None]
) -> list[BlockHeader]:
# Finds the point where the fork is disconnected from the local block tree,
# and returns the suffix of the fork from the disconnected point to the tip.
# The disconnected point may be different from the divergence point of the fork
# in the case where the fork has been partially backfilled.
suffix: list[BlockHeader] = []
for block in fork:
if block.id() in local.ledger_state: