-
Notifications
You must be signed in to change notification settings - Fork 211
/
mocks.go
262 lines (221 loc) · 8.97 KB
/
mocks.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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
// Package miner is a generated GoMock package.
package miner
import (
context "context"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
types "github.com/spacemeshos/go-spacemesh/common/types"
tortoise "github.com/spacemeshos/go-spacemesh/tortoise"
)
// MockproposalOracle is a mock of proposalOracle interface.
type MockproposalOracle struct {
ctrl *gomock.Controller
recorder *MockproposalOracleMockRecorder
}
// MockproposalOracleMockRecorder is the mock recorder for MockproposalOracle.
type MockproposalOracleMockRecorder struct {
mock *MockproposalOracle
}
// NewMockproposalOracle creates a new mock instance.
func NewMockproposalOracle(ctrl *gomock.Controller) *MockproposalOracle {
mock := &MockproposalOracle{ctrl: ctrl}
mock.recorder = &MockproposalOracleMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockproposalOracle) EXPECT() *MockproposalOracleMockRecorder {
return m.recorder
}
// GetProposalEligibility mocks base method.
func (m *MockproposalOracle) GetProposalEligibility(arg0 types.LayerID, arg1 types.Beacon, arg2 types.VRFPostIndex) (*EpochEligibility, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetProposalEligibility", arg0, arg1, arg2)
ret0, _ := ret[0].(*EpochEligibility)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetProposalEligibility indicates an expected call of GetProposalEligibility.
func (mr *MockproposalOracleMockRecorder) GetProposalEligibility(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposalEligibility", reflect.TypeOf((*MockproposalOracle)(nil).GetProposalEligibility), arg0, arg1, arg2)
}
// MockconservativeState is a mock of conservativeState interface.
type MockconservativeState struct {
ctrl *gomock.Controller
recorder *MockconservativeStateMockRecorder
}
// MockconservativeStateMockRecorder is the mock recorder for MockconservativeState.
type MockconservativeStateMockRecorder struct {
mock *MockconservativeState
}
// NewMockconservativeState creates a new mock instance.
func NewMockconservativeState(ctrl *gomock.Controller) *MockconservativeState {
mock := &MockconservativeState{ctrl: ctrl}
mock.recorder = &MockconservativeStateMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockconservativeState) EXPECT() *MockconservativeStateMockRecorder {
return m.recorder
}
// SelectProposalTXs mocks base method.
func (m *MockconservativeState) SelectProposalTXs(arg0 types.LayerID, arg1 int) []types.TransactionID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SelectProposalTXs", arg0, arg1)
ret0, _ := ret[0].([]types.TransactionID)
return ret0
}
// SelectProposalTXs indicates an expected call of SelectProposalTXs.
func (mr *MockconservativeStateMockRecorder) SelectProposalTXs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectProposalTXs", reflect.TypeOf((*MockconservativeState)(nil).SelectProposalTXs), arg0, arg1)
}
// MockvotesEncoder is a mock of votesEncoder interface.
type MockvotesEncoder struct {
ctrl *gomock.Controller
recorder *MockvotesEncoderMockRecorder
}
// MockvotesEncoderMockRecorder is the mock recorder for MockvotesEncoder.
type MockvotesEncoderMockRecorder struct {
mock *MockvotesEncoder
}
// NewMockvotesEncoder creates a new mock instance.
func NewMockvotesEncoder(ctrl *gomock.Controller) *MockvotesEncoder {
mock := &MockvotesEncoder{ctrl: ctrl}
mock.recorder = &MockvotesEncoderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockvotesEncoder) EXPECT() *MockvotesEncoderMockRecorder {
return m.recorder
}
// EncodeVotes mocks base method.
func (m *MockvotesEncoder) EncodeVotes(arg0 context.Context, arg1 ...tortoise.EncodeVotesOpts) (*types.Opinion, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "EncodeVotes", varargs...)
ret0, _ := ret[0].(*types.Opinion)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// EncodeVotes indicates an expected call of EncodeVotes.
func (mr *MockvotesEncoderMockRecorder) EncodeVotes(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncodeVotes", reflect.TypeOf((*MockvotesEncoder)(nil).EncodeVotes), varargs...)
}
// LatestComplete mocks base method.
func (m *MockvotesEncoder) LatestComplete() types.LayerID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LatestComplete")
ret0, _ := ret[0].(types.LayerID)
return ret0
}
// LatestComplete indicates an expected call of LatestComplete.
func (mr *MockvotesEncoderMockRecorder) LatestComplete() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LatestComplete", reflect.TypeOf((*MockvotesEncoder)(nil).LatestComplete))
}
// TallyVotes mocks base method.
func (m *MockvotesEncoder) TallyVotes(arg0 context.Context, arg1 types.LayerID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "TallyVotes", arg0, arg1)
}
// TallyVotes indicates an expected call of TallyVotes.
func (mr *MockvotesEncoderMockRecorder) TallyVotes(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TallyVotes", reflect.TypeOf((*MockvotesEncoder)(nil).TallyVotes), arg0, arg1)
}
// MocknonceFetcher is a mock of nonceFetcher interface.
type MocknonceFetcher struct {
ctrl *gomock.Controller
recorder *MocknonceFetcherMockRecorder
}
// MocknonceFetcherMockRecorder is the mock recorder for MocknonceFetcher.
type MocknonceFetcherMockRecorder struct {
mock *MocknonceFetcher
}
// NewMocknonceFetcher creates a new mock instance.
func NewMocknonceFetcher(ctrl *gomock.Controller) *MocknonceFetcher {
mock := &MocknonceFetcher{ctrl: ctrl}
mock.recorder = &MocknonceFetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocknonceFetcher) EXPECT() *MocknonceFetcherMockRecorder {
return m.recorder
}
// VRFNonce mocks base method.
func (m *MocknonceFetcher) VRFNonce(arg0 types.NodeID, arg1 types.EpochID) (types.VRFPostIndex, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VRFNonce", arg0, arg1)
ret0, _ := ret[0].(types.VRFPostIndex)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// VRFNonce indicates an expected call of VRFNonce.
func (mr *MocknonceFetcherMockRecorder) VRFNonce(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VRFNonce", reflect.TypeOf((*MocknonceFetcher)(nil).VRFNonce), arg0, arg1)
}
// MocklayerClock is a mock of layerClock interface.
type MocklayerClock struct {
ctrl *gomock.Controller
recorder *MocklayerClockMockRecorder
}
// MocklayerClockMockRecorder is the mock recorder for MocklayerClock.
type MocklayerClockMockRecorder struct {
mock *MocklayerClock
}
// NewMocklayerClock creates a new mock instance.
func NewMocklayerClock(ctrl *gomock.Controller) *MocklayerClock {
mock := &MocklayerClock{ctrl: ctrl}
mock.recorder = &MocklayerClockMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocklayerClock) EXPECT() *MocklayerClockMockRecorder {
return m.recorder
}
// AwaitLayer mocks base method.
func (m *MocklayerClock) AwaitLayer(layerID types.LayerID) chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AwaitLayer", layerID)
ret0, _ := ret[0].(chan struct{})
return ret0
}
// AwaitLayer indicates an expected call of AwaitLayer.
func (mr *MocklayerClockMockRecorder) AwaitLayer(layerID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AwaitLayer", reflect.TypeOf((*MocklayerClock)(nil).AwaitLayer), layerID)
}
// CurrentLayer mocks base method.
func (m *MocklayerClock) CurrentLayer() types.LayerID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CurrentLayer")
ret0, _ := ret[0].(types.LayerID)
return ret0
}
// CurrentLayer indicates an expected call of CurrentLayer.
func (mr *MocklayerClockMockRecorder) CurrentLayer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer))
}
// LayerToTime mocks base method.
func (m *MocklayerClock) LayerToTime(arg0 types.LayerID) time.Time {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LayerToTime", arg0)
ret0, _ := ret[0].(time.Time)
return ret0
}
// LayerToTime indicates an expected call of LayerToTime.
func (mr *MocklayerClockMockRecorder) LayerToTime(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LayerToTime", reflect.TypeOf((*MocklayerClock)(nil).LayerToTime), arg0)
}