-
Notifications
You must be signed in to change notification settings - Fork 210
/
mocks.go
601 lines (510 loc) · 22.1 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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
types "github.com/spacemeshos/go-spacemesh/common/types"
fetch "github.com/spacemeshos/go-spacemesh/fetch"
p2p "github.com/spacemeshos/go-spacemesh/p2p"
)
// MocklayerTicker is a mock of layerTicker interface.
type MocklayerTicker struct {
ctrl *gomock.Controller
recorder *MocklayerTickerMockRecorder
}
// MocklayerTickerMockRecorder is the mock recorder for MocklayerTicker.
type MocklayerTickerMockRecorder struct {
mock *MocklayerTicker
}
// NewMocklayerTicker creates a new mock instance.
func NewMocklayerTicker(ctrl *gomock.Controller) *MocklayerTicker {
mock := &MocklayerTicker{ctrl: ctrl}
mock.recorder = &MocklayerTickerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocklayerTicker) EXPECT() *MocklayerTickerMockRecorder {
return m.recorder
}
// GetCurrentLayer mocks base method.
func (m *MocklayerTicker) GetCurrentLayer() types.LayerID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCurrentLayer")
ret0, _ := ret[0].(types.LayerID)
return ret0
}
// GetCurrentLayer indicates an expected call of GetCurrentLayer.
func (mr *MocklayerTickerMockRecorder) GetCurrentLayer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentLayer", reflect.TypeOf((*MocklayerTicker)(nil).GetCurrentLayer))
}
// MockmeshProvider is a mock of meshProvider interface.
type MockmeshProvider struct {
ctrl *gomock.Controller
recorder *MockmeshProviderMockRecorder
}
// MockmeshProviderMockRecorder is the mock recorder for MockmeshProvider.
type MockmeshProviderMockRecorder struct {
mock *MockmeshProvider
}
// NewMockmeshProvider creates a new mock instance.
func NewMockmeshProvider(ctrl *gomock.Controller) *MockmeshProvider {
mock := &MockmeshProvider{ctrl: ctrl}
mock.recorder = &MockmeshProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockmeshProvider) EXPECT() *MockmeshProviderMockRecorder {
return m.recorder
}
// SetZeroBlockLayer mocks base method.
func (m *MockmeshProvider) SetZeroBlockLayer(arg0 context.Context, arg1 types.LayerID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetZeroBlockLayer", arg0, arg1)
}
// SetZeroBlockLayer indicates an expected call of SetZeroBlockLayer.
func (mr *MockmeshProviderMockRecorder) SetZeroBlockLayer(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetZeroBlockLayer", reflect.TypeOf((*MockmeshProvider)(nil).SetZeroBlockLayer), arg0, arg1)
}
// MockfetchLogic is a mock of fetchLogic interface.
type MockfetchLogic struct {
ctrl *gomock.Controller
recorder *MockfetchLogicMockRecorder
}
// MockfetchLogicMockRecorder is the mock recorder for MockfetchLogic.
type MockfetchLogicMockRecorder struct {
mock *MockfetchLogic
}
// NewMockfetchLogic creates a new mock instance.
func NewMockfetchLogic(ctrl *gomock.Controller) *MockfetchLogic {
mock := &MockfetchLogic{ctrl: ctrl}
mock.recorder = &MockfetchLogicMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockfetchLogic) EXPECT() *MockfetchLogicMockRecorder {
return m.recorder
}
// GetAtxs mocks base method.
func (m *MockfetchLogic) GetAtxs(arg0 context.Context, arg1 []types.ATXID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAtxs", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetAtxs indicates an expected call of GetAtxs.
func (mr *MockfetchLogicMockRecorder) GetAtxs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxs", reflect.TypeOf((*MockfetchLogic)(nil).GetAtxs), arg0, arg1)
}
// GetBallots mocks base method.
func (m *MockfetchLogic) GetBallots(arg0 context.Context, arg1 []types.BallotID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBallots", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetBallots indicates an expected call of GetBallots.
func (mr *MockfetchLogicMockRecorder) GetBallots(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallots", reflect.TypeOf((*MockfetchLogic)(nil).GetBallots), arg0, arg1)
}
// GetBlocks mocks base method.
func (m *MockfetchLogic) GetBlocks(arg0 context.Context, arg1 []types.BlockID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlocks", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetBlocks indicates an expected call of GetBlocks.
func (mr *MockfetchLogicMockRecorder) GetBlocks(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*MockfetchLogic)(nil).GetBlocks), arg0, arg1)
}
// GetEpochATXs mocks base method.
func (m *MockfetchLogic) GetEpochATXs(arg0 context.Context, arg1 types.EpochID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetEpochATXs", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetEpochATXs indicates an expected call of GetEpochATXs.
func (mr *MockfetchLogicMockRecorder) GetEpochATXs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEpochATXs", reflect.TypeOf((*MockfetchLogic)(nil).GetEpochATXs), arg0, arg1)
}
// GetLayerData mocks base method.
func (m *MockfetchLogic) GetLayerData(arg0 context.Context, arg1 []p2p.Peer, arg2 types.LayerID, arg3 func([]byte, p2p.Peer), arg4 func(error, p2p.Peer)) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLayerData", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// GetLayerData indicates an expected call of GetLayerData.
func (mr *MockfetchLogicMockRecorder) GetLayerData(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerData", reflect.TypeOf((*MockfetchLogic)(nil).GetLayerData), arg0, arg1, arg2, arg3, arg4)
}
// GetLayerOpinions mocks base method.
func (m *MockfetchLogic) GetLayerOpinions(arg0 context.Context, arg1 []p2p.Peer, arg2 types.LayerID, arg3 func([]byte, p2p.Peer), arg4 func(error, p2p.Peer)) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLayerOpinions", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// GetLayerOpinions indicates an expected call of GetLayerOpinions.
func (mr *MockfetchLogicMockRecorder) GetLayerOpinions(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerOpinions", reflect.TypeOf((*MockfetchLogic)(nil).GetLayerOpinions), arg0, arg1, arg2, arg3, arg4)
}
// GetPeers mocks base method.
func (m *MockfetchLogic) GetPeers() []p2p.Peer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPeers")
ret0, _ := ret[0].([]p2p.Peer)
return ret0
}
// GetPeers indicates an expected call of GetPeers.
func (mr *MockfetchLogicMockRecorder) GetPeers() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPeers", reflect.TypeOf((*MockfetchLogic)(nil).GetPeers))
}
// PeerEpochInfo mocks base method.
func (m *MockfetchLogic) PeerEpochInfo(arg0 context.Context, arg1 p2p.Peer, arg2 types.EpochID) (*fetch.EpochData, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PeerEpochInfo", arg0, arg1, arg2)
ret0, _ := ret[0].(*fetch.EpochData)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PeerEpochInfo indicates an expected call of PeerEpochInfo.
func (mr *MockfetchLogicMockRecorder) PeerEpochInfo(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerEpochInfo", reflect.TypeOf((*MockfetchLogic)(nil).PeerEpochInfo), arg0, arg1, arg2)
}
// PeerMeshHashes mocks base method.
func (m *MockfetchLogic) PeerMeshHashes(arg0 context.Context, arg1 p2p.Peer, arg2 *fetch.MeshHashRequest) (*fetch.MeshHashes, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PeerMeshHashes", arg0, arg1, arg2)
ret0, _ := ret[0].(*fetch.MeshHashes)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PeerMeshHashes indicates an expected call of PeerMeshHashes.
func (mr *MockfetchLogicMockRecorder) PeerMeshHashes(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerMeshHashes", reflect.TypeOf((*MockfetchLogic)(nil).PeerMeshHashes), arg0, arg1, arg2)
}
// PollLayerData mocks base method.
func (m *MockfetchLogic) PollLayerData(arg0 context.Context, arg1 types.LayerID, arg2 ...p2p.Peer) error {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "PollLayerData", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// PollLayerData indicates an expected call of PollLayerData.
func (mr *MockfetchLogicMockRecorder) PollLayerData(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollLayerData", reflect.TypeOf((*MockfetchLogic)(nil).PollLayerData), varargs...)
}
// PollLayerOpinions mocks base method.
func (m *MockfetchLogic) PollLayerOpinions(arg0 context.Context, arg1 types.LayerID) ([]*fetch.LayerOpinion, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PollLayerOpinions", arg0, arg1)
ret0, _ := ret[0].([]*fetch.LayerOpinion)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PollLayerOpinions indicates an expected call of PollLayerOpinions.
func (mr *MockfetchLogicMockRecorder) PollLayerOpinions(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PollLayerOpinions", reflect.TypeOf((*MockfetchLogic)(nil).PollLayerOpinions), arg0, arg1)
}
// RegisterPeerHashes mocks base method.
func (m *MockfetchLogic) RegisterPeerHashes(peer p2p.Peer, hashes []types.Hash32) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RegisterPeerHashes", peer, hashes)
}
// RegisterPeerHashes indicates an expected call of RegisterPeerHashes.
func (mr *MockfetchLogicMockRecorder) RegisterPeerHashes(peer, hashes interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeerHashes", reflect.TypeOf((*MockfetchLogic)(nil).RegisterPeerHashes), peer, hashes)
}
// Mockfetcher is a mock of fetcher interface.
type Mockfetcher struct {
ctrl *gomock.Controller
recorder *MockfetcherMockRecorder
}
// MockfetcherMockRecorder is the mock recorder for Mockfetcher.
type MockfetcherMockRecorder struct {
mock *Mockfetcher
}
// NewMockfetcher creates a new mock instance.
func NewMockfetcher(ctrl *gomock.Controller) *Mockfetcher {
mock := &Mockfetcher{ctrl: ctrl}
mock.recorder = &MockfetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Mockfetcher) EXPECT() *MockfetcherMockRecorder {
return m.recorder
}
// GetAtxs mocks base method.
func (m *Mockfetcher) GetAtxs(arg0 context.Context, arg1 []types.ATXID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAtxs", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetAtxs indicates an expected call of GetAtxs.
func (mr *MockfetcherMockRecorder) GetAtxs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxs", reflect.TypeOf((*Mockfetcher)(nil).GetAtxs), arg0, arg1)
}
// GetBallots mocks base method.
func (m *Mockfetcher) GetBallots(arg0 context.Context, arg1 []types.BallotID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBallots", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetBallots indicates an expected call of GetBallots.
func (mr *MockfetcherMockRecorder) GetBallots(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallots", reflect.TypeOf((*Mockfetcher)(nil).GetBallots), arg0, arg1)
}
// GetBlocks mocks base method.
func (m *Mockfetcher) GetBlocks(arg0 context.Context, arg1 []types.BlockID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlocks", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetBlocks indicates an expected call of GetBlocks.
func (mr *MockfetcherMockRecorder) GetBlocks(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*Mockfetcher)(nil).GetBlocks), arg0, arg1)
}
// GetLayerData mocks base method.
func (m *Mockfetcher) GetLayerData(arg0 context.Context, arg1 []p2p.Peer, arg2 types.LayerID, arg3 func([]byte, p2p.Peer), arg4 func(error, p2p.Peer)) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLayerData", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// GetLayerData indicates an expected call of GetLayerData.
func (mr *MockfetcherMockRecorder) GetLayerData(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerData", reflect.TypeOf((*Mockfetcher)(nil).GetLayerData), arg0, arg1, arg2, arg3, arg4)
}
// GetLayerOpinions mocks base method.
func (m *Mockfetcher) GetLayerOpinions(arg0 context.Context, arg1 []p2p.Peer, arg2 types.LayerID, arg3 func([]byte, p2p.Peer), arg4 func(error, p2p.Peer)) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLayerOpinions", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// GetLayerOpinions indicates an expected call of GetLayerOpinions.
func (mr *MockfetcherMockRecorder) GetLayerOpinions(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerOpinions", reflect.TypeOf((*Mockfetcher)(nil).GetLayerOpinions), arg0, arg1, arg2, arg3, arg4)
}
// GetPeers mocks base method.
func (m *Mockfetcher) GetPeers() []p2p.Peer {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPeers")
ret0, _ := ret[0].([]p2p.Peer)
return ret0
}
// GetPeers indicates an expected call of GetPeers.
func (mr *MockfetcherMockRecorder) GetPeers() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPeers", reflect.TypeOf((*Mockfetcher)(nil).GetPeers))
}
// PeerEpochInfo mocks base method.
func (m *Mockfetcher) PeerEpochInfo(arg0 context.Context, arg1 p2p.Peer, arg2 types.EpochID) (*fetch.EpochData, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PeerEpochInfo", arg0, arg1, arg2)
ret0, _ := ret[0].(*fetch.EpochData)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PeerEpochInfo indicates an expected call of PeerEpochInfo.
func (mr *MockfetcherMockRecorder) PeerEpochInfo(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerEpochInfo", reflect.TypeOf((*Mockfetcher)(nil).PeerEpochInfo), arg0, arg1, arg2)
}
// PeerMeshHashes mocks base method.
func (m *Mockfetcher) PeerMeshHashes(arg0 context.Context, arg1 p2p.Peer, arg2 *fetch.MeshHashRequest) (*fetch.MeshHashes, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PeerMeshHashes", arg0, arg1, arg2)
ret0, _ := ret[0].(*fetch.MeshHashes)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PeerMeshHashes indicates an expected call of PeerMeshHashes.
func (mr *MockfetcherMockRecorder) PeerMeshHashes(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PeerMeshHashes", reflect.TypeOf((*Mockfetcher)(nil).PeerMeshHashes), arg0, arg1, arg2)
}
// RegisterPeerHashes mocks base method.
func (m *Mockfetcher) RegisterPeerHashes(peer p2p.Peer, hashes []types.Hash32) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RegisterPeerHashes", peer, hashes)
}
// RegisterPeerHashes indicates an expected call of RegisterPeerHashes.
func (mr *MockfetcherMockRecorder) RegisterPeerHashes(peer, hashes interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeerHashes", reflect.TypeOf((*Mockfetcher)(nil).RegisterPeerHashes), peer, hashes)
}
// MocklayerPatrol is a mock of layerPatrol interface.
type MocklayerPatrol struct {
ctrl *gomock.Controller
recorder *MocklayerPatrolMockRecorder
}
// MocklayerPatrolMockRecorder is the mock recorder for MocklayerPatrol.
type MocklayerPatrolMockRecorder struct {
mock *MocklayerPatrol
}
// NewMocklayerPatrol creates a new mock instance.
func NewMocklayerPatrol(ctrl *gomock.Controller) *MocklayerPatrol {
mock := &MocklayerPatrol{ctrl: ctrl}
mock.recorder = &MocklayerPatrolMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocklayerPatrol) EXPECT() *MocklayerPatrolMockRecorder {
return m.recorder
}
// IsHareInCharge mocks base method.
func (m *MocklayerPatrol) IsHareInCharge(arg0 types.LayerID) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsHareInCharge", arg0)
ret0, _ := ret[0].(bool)
return ret0
}
// IsHareInCharge indicates an expected call of IsHareInCharge.
func (mr *MocklayerPatrolMockRecorder) IsHareInCharge(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsHareInCharge", reflect.TypeOf((*MocklayerPatrol)(nil).IsHareInCharge), arg0)
}
// MockcertHandler is a mock of certHandler interface.
type MockcertHandler struct {
ctrl *gomock.Controller
recorder *MockcertHandlerMockRecorder
}
// MockcertHandlerMockRecorder is the mock recorder for MockcertHandler.
type MockcertHandlerMockRecorder struct {
mock *MockcertHandler
}
// NewMockcertHandler creates a new mock instance.
func NewMockcertHandler(ctrl *gomock.Controller) *MockcertHandler {
mock := &MockcertHandler{ctrl: ctrl}
mock.recorder = &MockcertHandlerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockcertHandler) EXPECT() *MockcertHandlerMockRecorder {
return m.recorder
}
// HandleSyncedCertificate mocks base method.
func (m *MockcertHandler) HandleSyncedCertificate(arg0 context.Context, arg1 types.LayerID, arg2 *types.Certificate) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleSyncedCertificate", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// HandleSyncedCertificate indicates an expected call of HandleSyncedCertificate.
func (mr *MockcertHandlerMockRecorder) HandleSyncedCertificate(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleSyncedCertificate", reflect.TypeOf((*MockcertHandler)(nil).HandleSyncedCertificate), arg0, arg1, arg2)
}
// MockforkFinder is a mock of forkFinder interface.
type MockforkFinder struct {
ctrl *gomock.Controller
recorder *MockforkFinderMockRecorder
}
// MockforkFinderMockRecorder is the mock recorder for MockforkFinder.
type MockforkFinderMockRecorder struct {
mock *MockforkFinder
}
// NewMockforkFinder creates a new mock instance.
func NewMockforkFinder(ctrl *gomock.Controller) *MockforkFinder {
mock := &MockforkFinder{ctrl: ctrl}
mock.recorder = &MockforkFinderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockforkFinder) EXPECT() *MockforkFinderMockRecorder {
return m.recorder
}
// AddResynced mocks base method.
func (m *MockforkFinder) AddResynced(arg0 types.LayerID, arg1 types.Hash32) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AddResynced", arg0, arg1)
}
// AddResynced indicates an expected call of AddResynced.
func (mr *MockforkFinderMockRecorder) AddResynced(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddResynced", reflect.TypeOf((*MockforkFinder)(nil).AddResynced), arg0, arg1)
}
// FindFork mocks base method.
func (m *MockforkFinder) FindFork(arg0 context.Context, arg1 p2p.Peer, arg2 types.LayerID, arg3 types.Hash32) (types.LayerID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindFork", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(types.LayerID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindFork indicates an expected call of FindFork.
func (mr *MockforkFinderMockRecorder) FindFork(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindFork", reflect.TypeOf((*MockforkFinder)(nil).FindFork), arg0, arg1, arg2, arg3)
}
// NeedResync mocks base method.
func (m *MockforkFinder) NeedResync(arg0 types.LayerID, arg1 types.Hash32) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NeedResync", arg0, arg1)
ret0, _ := ret[0].(bool)
return ret0
}
// NeedResync indicates an expected call of NeedResync.
func (mr *MockforkFinderMockRecorder) NeedResync(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NeedResync", reflect.TypeOf((*MockforkFinder)(nil).NeedResync), arg0, arg1)
}
// Purge mocks base method.
func (m *MockforkFinder) Purge(arg0 bool, arg1 ...p2p.Peer) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0}
for _, a := range arg1 {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "Purge", varargs...)
}
// Purge indicates an expected call of Purge.
func (mr *MockforkFinderMockRecorder) Purge(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0}, arg1...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Purge", reflect.TypeOf((*MockforkFinder)(nil).Purge), varargs...)
}
// UpdateAgreement mocks base method.
func (m *MockforkFinder) UpdateAgreement(arg0 p2p.Peer, arg1 types.LayerID, arg2 types.Hash32, arg3 time.Time) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdateAgreement", arg0, arg1, arg2, arg3)
}
// UpdateAgreement indicates an expected call of UpdateAgreement.
func (mr *MockforkFinderMockRecorder) UpdateAgreement(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAgreement", reflect.TypeOf((*MockforkFinder)(nil).UpdateAgreement), arg0, arg1, arg2, arg3)
}