Versions in this module Expand all Collapse all v1 v1.11.10 Jul 13, 2024 Changes in this version + const MaxBuildDelay + const MaxBuildWindows + const MaxLookAheadSlots + const MaxLookAheadWindow + const MaxVerifyDelay + const MaxVerifyWindows + const WindowDuration + var ErrAnyoneCanPropose = errors.New("anyone can propose") + var ErrUnexpectedSamplerFailure = errors.New("unexpected sampler failure") + func TimeToSlot(start, now time.Time) uint64 + type MockWindower struct + func NewMockWindower(ctrl *gomock.Controller) *MockWindower + func (m *MockWindower) Delay(arg0 context.Context, arg1, arg2 uint64, arg3 ids.NodeID, arg4 int) (time.Duration, error) + func (m *MockWindower) EXPECT() *MockWindowerMockRecorder + func (m *MockWindower) ExpectedProposer(arg0 context.Context, arg1, arg2, arg3 uint64) (ids.NodeID, error) + func (m *MockWindower) MinDelayForProposer(arg0 context.Context, arg1, arg2 uint64, arg3 ids.NodeID, arg4 uint64) (time.Duration, error) + func (m *MockWindower) Proposers(arg0 context.Context, arg1, arg2 uint64, arg3 int) ([]ids.NodeID, error) + type MockWindowerMockRecorder struct + func (mr *MockWindowerMockRecorder) Delay(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call + func (mr *MockWindowerMockRecorder) ExpectedProposer(arg0, arg1, arg2, arg3 any) *gomock.Call + func (mr *MockWindowerMockRecorder) MinDelayForProposer(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call + func (mr *MockWindowerMockRecorder) Proposers(arg0, arg1, arg2, arg3 any) *gomock.Call + type Windower interface + Delay func(ctx context.Context, blockHeight, pChainHeight uint64, validatorID ids.NodeID, ...) (time.Duration, error) + ExpectedProposer func(ctx context.Context, blockHeight, pChainHeight, slot uint64) (ids.NodeID, error) + MinDelayForProposer func(ctx context.Context, blockHeight, pChainHeight uint64, nodeID ids.NodeID, ...) (time.Duration, error) + Proposers func(ctx context.Context, blockHeight, pChainHeight uint64, maxWindows int) ([]ids.NodeID, error) + func New(state validators.State, subnetID, chainID ids.ID) Windower