Skip to content

Commit 69a799a

Browse files
tcoratgerunnawut
andauthored
Update src/lean_spec/subspecs/forkchoice/store.py
Co-authored-by: Unnawut Leepaisalsuwanna <921194+unnawut@users.noreply.github.com>
1 parent 10c1bdf commit 69a799a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • src/lean_spec/subspecs/forkchoice

src/lean_spec/subspecs/forkchoice/store.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,14 +540,14 @@ def _compute_lmd_ghost_head(
540540
#
541541
# Each visited block accumulates one unit of weight from that validator.
542542
for attestation in attestations.values():
543-
curr = attestation.message.data.head.root
543+
current_root = attestation.message.data.head.root
544544

545545
# Climb towards the anchor while staying inside the known tree.
546546
#
547547
# This naturally handles partial views and ongoing sync.
548-
while curr in self.blocks and self.blocks[curr].slot > start_slot:
549-
weights[curr] += 1
550-
curr = self.blocks[curr].parent_root
548+
while current_root in self.blocks and self.blocks[curr].slot > start_slot:
549+
weights[current_root] += 1
550+
current_root = self.blocks[current_root].parent_root
551551

552552
# Build the adjacency tree (parent -> children).
553553
#

0 commit comments

Comments
 (0)