Documentation ¶
Overview ¶
Package committee is a generated GoMock package.
Index ¶
- Variables
- func NewSet(members types.Committee, policy config.ProposerPolicy, ...) (*defaultSet, error)
- type MockSet
- func (m *MockSet) Committee() types.Committee
- func (m *MockSet) Copy() Set
- func (m *MockSet) EXPECT() *MockSetMockRecorder
- func (m *MockSet) F() uint64
- func (m *MockSet) GetByAddress(addr common.Address) (int, types.CommitteeMember, error)
- func (m *MockSet) GetByIndex(i int) (types.CommitteeMember, error)
- func (m *MockSet) GetProposer(round int64) types.CommitteeMember
- func (m *MockSet) IsProposer(round int64, address common.Address) bool
- func (m *MockSet) Quorum() uint64
- func (m *MockSet) Size() int
- type MockSetMockRecorder
- func (mr *MockSetMockRecorder) Committee() *gomock.Call
- func (mr *MockSetMockRecorder) Copy() *gomock.Call
- func (mr *MockSetMockRecorder) F() *gomock.Call
- func (mr *MockSetMockRecorder) GetByAddress(addr interface{}) *gomock.Call
- func (mr *MockSetMockRecorder) GetByIndex(i interface{}) *gomock.Call
- func (mr *MockSetMockRecorder) GetProposer(round interface{}) *gomock.Call
- func (mr *MockSetMockRecorder) IsProposer(round, address interface{}) *gomock.Call
- func (mr *MockSetMockRecorder) Quorum() *gomock.Call
- func (mr *MockSetMockRecorder) Size() *gomock.Call
- type ProposalSelector
- type Set
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyCommitteeSet = errors.New("committee set can't be empty")
Functions ¶
Types ¶
type MockSet ¶
type MockSet struct {
// contains filtered or unexported fields
}
MockSet is a mock of Set interface
func NewMockSet ¶
func NewMockSet(ctrl *gomock.Controller) *MockSet
NewMockSet creates a new mock instance
func (*MockSet) EXPECT ¶
func (m *MockSet) EXPECT() *MockSetMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSet) GetByAddress ¶
GetByAddress mocks base method
func (*MockSet) GetByIndex ¶
func (m *MockSet) GetByIndex(i int) (types.CommitteeMember, error)
GetByIndex mocks base method
func (*MockSet) GetProposer ¶
func (m *MockSet) GetProposer(round int64) types.CommitteeMember
GetProposer mocks base method
func (*MockSet) IsProposer ¶
IsProposer mocks base method
type MockSetMockRecorder ¶
type MockSetMockRecorder struct {
// contains filtered or unexported fields
}
MockSetMockRecorder is the mock recorder for MockSet
func (*MockSetMockRecorder) Committee ¶
func (mr *MockSetMockRecorder) Committee() *gomock.Call
Committee indicates an expected call of Committee
func (*MockSetMockRecorder) Copy ¶
func (mr *MockSetMockRecorder) Copy() *gomock.Call
Copy indicates an expected call of Copy
func (*MockSetMockRecorder) F ¶
func (mr *MockSetMockRecorder) F() *gomock.Call
F indicates an expected call of F
func (*MockSetMockRecorder) GetByAddress ¶
func (mr *MockSetMockRecorder) GetByAddress(addr interface{}) *gomock.Call
GetByAddress indicates an expected call of GetByAddress
func (*MockSetMockRecorder) GetByIndex ¶
func (mr *MockSetMockRecorder) GetByIndex(i interface{}) *gomock.Call
GetByIndex indicates an expected call of GetByIndex
func (*MockSetMockRecorder) GetProposer ¶
func (mr *MockSetMockRecorder) GetProposer(round interface{}) *gomock.Call
GetProposer indicates an expected call of GetProposer
func (*MockSetMockRecorder) IsProposer ¶
func (mr *MockSetMockRecorder) IsProposer(round, address interface{}) *gomock.Call
IsProposer indicates an expected call of IsProposer
func (*MockSetMockRecorder) Quorum ¶
func (mr *MockSetMockRecorder) Quorum() *gomock.Call
Quorum indicates an expected call of Quorum
func (*MockSetMockRecorder) Size ¶
func (mr *MockSetMockRecorder) Size() *gomock.Call
Size indicates an expected call of Size
type ProposalSelector ¶
type Set ¶
type Set interface { // Return the validator size Size() int // Return the underlying types.Committee Committee() types.Committee // Get validator by index GetByIndex(i int) (types.CommitteeMember, error) // Get validator by given address GetByAddress(addr common.Address) (int, types.CommitteeMember, error) // Get the round proposer GetProposer(round int64) types.CommitteeMember // Check whether the validator with given address is the round proposer IsProposer(round int64, address common.Address) bool // Copy validator set Copy() Set // Get the maximum number of faulty nodes F() uint64 // Get the optimal quorum size Quorum() uint64 }