-
Notifications
You must be signed in to change notification settings - Fork 324
/
mock_poll.go
234 lines (201 loc) · 8.82 KB
/
mock_poll.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// Code generated by MockGen. DO NOT EDIT.
// Source: ./action/protocol/poll/protocol.go
// Package mock_poll is a generated GoMock package.
package mock_poll
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
action "github.com/iotexproject/iotex-core/action"
protocol "github.com/iotexproject/iotex-core/action/protocol"
state "github.com/iotexproject/iotex-core/state"
)
// MockProtocol is a mock of Protocol interface.
type MockProtocol struct {
ctrl *gomock.Controller
recorder *MockProtocolMockRecorder
}
// MockProtocolMockRecorder is the mock recorder for MockProtocol.
type MockProtocolMockRecorder struct {
mock *MockProtocol
}
// NewMockProtocol creates a new mock instance.
func NewMockProtocol(ctrl *gomock.Controller) *MockProtocol {
mock := &MockProtocol{ctrl: ctrl}
mock.recorder = &MockProtocolMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockProtocol) EXPECT() *MockProtocolMockRecorder {
return m.recorder
}
// CalculateCandidatesByHeight mocks base method.
func (m *MockProtocol) CalculateCandidatesByHeight(arg0 context.Context, arg1 protocol.StateReader, arg2 uint64) (state.CandidateList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CalculateCandidatesByHeight", arg0, arg1, arg2)
ret0, _ := ret[0].(state.CandidateList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CalculateCandidatesByHeight indicates an expected call of CalculateCandidatesByHeight.
func (mr *MockProtocolMockRecorder) CalculateCandidatesByHeight(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateCandidatesByHeight", reflect.TypeOf((*MockProtocol)(nil).CalculateCandidatesByHeight), arg0, arg1, arg2)
}
// CalculateUnproductiveDelegates mocks base method.
func (m *MockProtocol) CalculateUnproductiveDelegates(arg0 context.Context, arg1 protocol.StateReader) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CalculateUnproductiveDelegates", arg0, arg1)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CalculateUnproductiveDelegates indicates an expected call of CalculateUnproductiveDelegates.
func (mr *MockProtocolMockRecorder) CalculateUnproductiveDelegates(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalculateUnproductiveDelegates", reflect.TypeOf((*MockProtocol)(nil).CalculateUnproductiveDelegates), arg0, arg1)
}
// Candidates mocks base method.
func (m *MockProtocol) Candidates(arg0 context.Context, arg1 protocol.StateReader) (state.CandidateList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Candidates", arg0, arg1)
ret0, _ := ret[0].(state.CandidateList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Candidates indicates an expected call of Candidates.
func (mr *MockProtocolMockRecorder) Candidates(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Candidates", reflect.TypeOf((*MockProtocol)(nil).Candidates), arg0, arg1)
}
// CreateGenesisStates mocks base method.
func (m *MockProtocol) CreateGenesisStates(arg0 context.Context, arg1 protocol.StateManager) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateGenesisStates", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// CreateGenesisStates indicates an expected call of CreateGenesisStates.
func (mr *MockProtocolMockRecorder) CreateGenesisStates(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGenesisStates", reflect.TypeOf((*MockProtocol)(nil).CreateGenesisStates), arg0, arg1)
}
// Delegates mocks base method.
func (m *MockProtocol) Delegates(arg0 context.Context, arg1 protocol.StateReader) (state.CandidateList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delegates", arg0, arg1)
ret0, _ := ret[0].(state.CandidateList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Delegates indicates an expected call of Delegates.
func (mr *MockProtocolMockRecorder) Delegates(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delegates", reflect.TypeOf((*MockProtocol)(nil).Delegates), arg0, arg1)
}
// ForceRegister mocks base method.
func (m *MockProtocol) ForceRegister(arg0 *protocol.Registry) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ForceRegister", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// ForceRegister indicates an expected call of ForceRegister.
func (mr *MockProtocolMockRecorder) ForceRegister(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceRegister", reflect.TypeOf((*MockProtocol)(nil).ForceRegister), arg0)
}
// Handle mocks base method.
func (m *MockProtocol) Handle(arg0 context.Context, arg1 action.Action, arg2 protocol.StateManager) (*action.Receipt, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Handle", arg0, arg1, arg2)
ret0, _ := ret[0].(*action.Receipt)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Handle indicates an expected call of Handle.
func (mr *MockProtocolMockRecorder) Handle(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Handle", reflect.TypeOf((*MockProtocol)(nil).Handle), arg0, arg1, arg2)
}
// Name mocks base method.
func (m *MockProtocol) Name() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name.
func (mr *MockProtocolMockRecorder) Name() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockProtocol)(nil).Name))
}
// NextCandidates mocks base method.
func (m *MockProtocol) NextCandidates(arg0 context.Context, arg1 protocol.StateReader) (state.CandidateList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextCandidates", arg0, arg1)
ret0, _ := ret[0].(state.CandidateList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NextCandidates indicates an expected call of NextCandidates.
func (mr *MockProtocolMockRecorder) NextCandidates(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextCandidates", reflect.TypeOf((*MockProtocol)(nil).NextCandidates), arg0, arg1)
}
// NextDelegates mocks base method.
func (m *MockProtocol) NextDelegates(arg0 context.Context, arg1 protocol.StateReader) (state.CandidateList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextDelegates", arg0, arg1)
ret0, _ := ret[0].(state.CandidateList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NextDelegates indicates an expected call of NextDelegates.
func (mr *MockProtocolMockRecorder) NextDelegates(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextDelegates", reflect.TypeOf((*MockProtocol)(nil).NextDelegates), arg0, arg1)
}
// ReadState mocks base method.
func (m *MockProtocol) ReadState(arg0 context.Context, arg1 protocol.StateReader, arg2 []byte, arg3 ...[]byte) ([]byte, uint64, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1, arg2}
for _, a := range arg3 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ReadState", varargs...)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(uint64)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// ReadState indicates an expected call of ReadState.
func (mr *MockProtocolMockRecorder) ReadState(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1, arg2}, arg3...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadState", reflect.TypeOf((*MockProtocol)(nil).ReadState), varargs...)
}
// Register mocks base method.
func (m *MockProtocol) Register(arg0 *protocol.Registry) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Register", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Register indicates an expected call of Register.
func (mr *MockProtocolMockRecorder) Register(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Register", reflect.TypeOf((*MockProtocol)(nil).Register), arg0)
}
// Validate mocks base method.
func (m *MockProtocol) Validate(arg0 context.Context, arg1 action.Action, arg2 protocol.StateReader) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Validate", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// Validate indicates an expected call of Validate.
func (mr *MockProtocolMockRecorder) Validate(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockProtocol)(nil).Validate), arg0, arg1, arg2)
}