Skip to content

refactor(testing): dispatch max-slot derivation with a match#1161

Merged
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:refactor-fork-choice-max-slot-match
Jun 18, 2026
Merged

refactor(testing): dispatch max-slot derivation with a match#1161
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:refactor-fork-choice-max-slot-match

Conversation

@tcoratger

Copy link
Copy Markdown
Collaborator

Summary

_resolved_max_slot filtered steps by isinstance and then re-tested the type in a ternary (a BlockStep was filtered in and re-checked; the two attestation types shared a branch hidden in the ternary's else). Replaced with a local match that tests each step type once and names the two attestation cases explicitly.

Pure structural refactor — max over the same multiset of slots. Found in the packages/testing audit (FIXTURES-04).

Lint: ruff check + ruff format clean.

The key-slot scan filtered steps by isinstance and re-tested the type in a ternary. A local
match tests each step type once and makes the two attestation cases explicit. Same slots,
vectors byte-identical.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tcoratger tcoratger merged commit 7d9ca7a into leanEthereum:main Jun 18, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant