Files
prysm/beacon-chain/state/state-native/getters_proposer_lookahead.go
Bastin 92bd211e4d upgrade v6 to v7 (#15989)
* upgrade v6 to v7

* changelog

* update-go-ssz
2025-11-06 16:16:23 +00:00

20 lines
584 B
Go

package state_native
import (
"slices"
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
"github.com/OffchainLabs/prysm/v7/runtime/version"
)
// ProposerLookahead is a non-mutating call to the beacon state which returns a slice of
// validator indices that hold the proposers in the next few slots.
func (b *BeaconState) ProposerLookahead() ([]primitives.ValidatorIndex, error) {
if b.version < version.Fulu {
return nil, errNotSupported("ProposerLookahead", b.version)
}
b.lock.RLock()
defer b.lock.RUnlock()
return slices.Clone(b.proposerLookahead), nil
}