mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-10 06:16:25 +00:00
9ee134324b
So far, `withState` and `withBlck` templates could only be used to have convenience access to fork-agnostic BeaconState and BeaconBlock fields. This patch: - injects an additional `stateFork` constant that allows to use `when` expressions to also access Altair and Merge-specific fields. - introduces a `withStateAndBlck` template to support operating on both a `BeaconState` and `BeaconBlock` at a time. - makes sync committee related functions Merge aware. - changes a couple if-else trees for forks into case statements so that forgotten future forks are promoted to compile-time errors.