Documentation ¶
Overview ¶
Package proposer is a generated GoMock package.
Index ¶
Constants ¶
View Source
const ( WindowDuration = 5 * time.Second MaxVerifyWindows = 6 MaxVerifyDelay = MaxVerifyWindows * WindowDuration // 30 seconds MaxBuildWindows = 60 MaxBuildDelay = MaxBuildWindows * WindowDuration // 5 minutes )
Proposer list constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockWindower ¶ added in v1.9.4
type MockWindower struct {
// contains filtered or unexported fields
}
MockWindower is a mock of Windower interface.
func NewMockWindower ¶ added in v1.9.4
func NewMockWindower(ctrl *gomock.Controller) *MockWindower
NewMockWindower creates a new mock instance.
func (*MockWindower) Delay ¶ added in v1.9.4
func (m *MockWindower) Delay(arg0 context.Context, arg1, arg2 uint64, arg3 ids.NodeID, arg4 int) (time.Duration, error)
Delay mocks base method.
func (*MockWindower) EXPECT ¶ added in v1.9.4
func (m *MockWindower) EXPECT() *MockWindowerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockWindowerMockRecorder ¶ added in v1.9.4
type MockWindowerMockRecorder struct {
// contains filtered or unexported fields
}
MockWindowerMockRecorder is the mock recorder for MockWindower.
func (*MockWindowerMockRecorder) Delay ¶ added in v1.9.4
func (mr *MockWindowerMockRecorder) Delay(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
Delay indicates an expected call of Delay.
func (*MockWindowerMockRecorder) Proposers ¶ added in v1.9.5
func (mr *MockWindowerMockRecorder) Proposers(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
Proposers indicates an expected call of Proposers.
type Windower ¶
type Windower interface { // Proposers returns the proposer list for building a block at [chainHeight] // when the validator set is defined at [pChainHeight]. The list is returned // in order. The minimum delay of a validator is the index they appear times // [WindowDuration]. Proposers( ctx context.Context, chainHeight, pChainHeight uint64, maxWindows int, ) ([]ids.NodeID, error) // Delay returns the amount of time that [validatorID] must wait before // building a block at [chainHeight] when the validator set is defined at // [pChainHeight]. Delay( ctx context.Context, chainHeight, pChainHeight uint64, validatorID ids.NodeID, maxWindows int, ) (time.Duration, error) }
Click to show internal directories.
Click to hide internal directories.