Skip to content

refactor(testing): build keyed genesis validators by comprehension#1162

Merged
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:refactor-genesis-validator-comprehension
Jun 18, 2026
Merged

refactor(testing): build keyed genesis validators by comprehension#1162
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:refactor-genesis-validator-comprehension

Conversation

@tcoratger

Copy link
Copy Markdown
Collaborator

Summary

In build_genesis_state, the keyed branch built the validator list with an imperative append loop while the unkeyed branch used a comprehension. Converted the keyed branch to a comprehension that mirrors the unkeyed one, so a reader sees one shape. The key-count guard is preserved.

Pure structural refactor — same validators, same order, same keys; genesis state byte-identical. Found in the packages/testing audit (INFRA-02).

Lint: ruff check + ruff format clean.

The keyed branch used an imperative append loop while the unkeyed branch was a comprehension.
Mirror the two so the paths read alike. Genesis state byte-identical.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tcoratger tcoratger merged commit 19a7824 into leanEthereum:main Jun 18, 2026
13 of 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