Skip to content

Commit 11dc4b6

Browse files
tcoratgerclaude
andauthored
refactor(fork-choice): make internal attestation-extraction helper private (#1136)
The attestation-extraction helper sits in the same private LMD-GHOST pipeline as its siblings, which are underscore-prefixed, yet it was public despite having no callers outside its own module. Rename it to match its siblings. Pure rename, behavior identical. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9f23975 commit 11dc4b6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/lean_spec/spec/forks/lstar/fork_choice.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ def on_block(
636636

637637
return store
638638

639-
def extract_attestations_from_aggregated_payloads(
639+
def _extract_attestations_from_aggregated_payloads(
640640
self,
641641
aggregated_payloads: dict[AttestationData, set[SingleMessageAggregate]],
642642
latest_finalized_slot: Slot,
@@ -728,7 +728,7 @@ def compute_block_weights(self, store: LstarStore) -> dict[Bytes32, int]:
728728
Each block root mapped to its accumulated vote weight.
729729
"""
730730
# Reduce the counted pool to each validator's latest still-relevant vote.
731-
latest_votes = self.extract_attestations_from_aggregated_payloads(
731+
latest_votes = self._extract_attestations_from_aggregated_payloads(
732732
store.latest_known_aggregated_payloads,
733733
store.latest_finalized.slot,
734734
)
@@ -815,7 +815,7 @@ def update_head(self, store: LstarStore) -> LstarStore:
815815
The store with its head set to the chosen block.
816816
"""
817817
# Reduce the counted pool to each validator's latest still-relevant vote.
818-
latest_votes = self.extract_attestations_from_aggregated_payloads(
818+
latest_votes = self._extract_attestations_from_aggregated_payloads(
819819
store.latest_known_aggregated_payloads,
820820
store.latest_finalized.slot,
821821
)
@@ -902,7 +902,7 @@ def update_safe_target(self, store: LstarStore) -> LstarStore:
902902
min_target_score = math.ceil(num_validators * 2 / 3)
903903

904904
# Reduce the pending pool to each validator's latest still-relevant vote.
905-
latest_votes = self.extract_attestations_from_aggregated_payloads(
905+
latest_votes = self._extract_attestations_from_aggregated_payloads(
906906
store.latest_new_aggregated_payloads,
907907
store.latest_finalized.slot,
908908
)

0 commit comments

Comments
 (0)