Skip to content

Commit e8d0bad

Browse files
committed
forkchoice store: add break in walk back
1 parent fdcd880 commit e8d0bad

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • src/lean_spec/subspecs/forkchoice

src/lean_spec/subspecs/forkchoice/store.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@ def get_attestation_target(self) -> Checkpoint:
791791
for _ in range(JUSTIFICATION_LOOKBACK_SLOTS):
792792
if self.blocks[target_block_root].slot > self.blocks[self.safe_target].slot:
793793
target_block_root = self.blocks[target_block_root].parent_root
794+
else:
795+
break
794796

795797
# Ensure target is in justifiable slot range
796798
#

0 commit comments

Comments
 (0)