-
Notifications
You must be signed in to change notification settings - Fork 211
/
fetcher.go
916 lines (770 loc) · 29.4 KB
/
fetcher.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
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
// Code generated by MockGen. DO NOT EDIT.
// Source: ./fetcher.go
//
// Generated by this command:
//
// mockgen -typed -package=mocks -destination=./mocks/fetcher.go -source=./fetcher.go
//
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
types "github.com/spacemeshos/go-spacemesh/common/types"
p2p "github.com/spacemeshos/go-spacemesh/p2p"
system "github.com/spacemeshos/go-spacemesh/system"
gomock "go.uber.org/mock/gomock"
)
// 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
}
// GetActiveSet mocks base method.
func (m *MockFetcher) GetActiveSet(arg0 context.Context, arg1 types.Hash32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetActiveSet", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetActiveSet indicates an expected call of GetActiveSet.
func (mr *MockFetcherMockRecorder) GetActiveSet(arg0, arg1 any) *FetcherGetActiveSetCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActiveSet", reflect.TypeOf((*MockFetcher)(nil).GetActiveSet), arg0, arg1)
return &FetcherGetActiveSetCall{Call: call}
}
// FetcherGetActiveSetCall wrap *gomock.Call
type FetcherGetActiveSetCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherGetActiveSetCall) Return(arg0 error) *FetcherGetActiveSetCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherGetActiveSetCall) Do(f func(context.Context, types.Hash32) error) *FetcherGetActiveSetCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherGetActiveSetCall) DoAndReturn(f func(context.Context, types.Hash32) error) *FetcherGetActiveSetCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// GetAtxs mocks base method.
func (m *MockFetcher) GetAtxs(arg0 context.Context, arg1 []types.ATXID, arg2 ...system.GetAtxOpt) error {
m.ctrl.T.Helper()
varargs := []any{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetAtxs", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// GetAtxs indicates an expected call of GetAtxs.
func (mr *MockFetcherMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *FetcherGetAtxsCall {
mr.mock.ctrl.T.Helper()
varargs := append([]any{arg0, arg1}, arg2...)
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxs", reflect.TypeOf((*MockFetcher)(nil).GetAtxs), varargs...)
return &FetcherGetAtxsCall{Call: call}
}
// FetcherGetAtxsCall wrap *gomock.Call
type FetcherGetAtxsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherGetAtxsCall) Return(arg0 error) *FetcherGetAtxsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *FetcherGetAtxsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *FetcherGetAtxsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *FetcherGetBallotsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallots", reflect.TypeOf((*MockFetcher)(nil).GetBallots), arg0, arg1)
return &FetcherGetBallotsCall{Call: call}
}
// FetcherGetBallotsCall wrap *gomock.Call
type FetcherGetBallotsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherGetBallotsCall) Return(arg0 error) *FetcherGetBallotsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *FetcherGetBallotsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *FetcherGetBallotsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// GetBlockTxs mocks base method.
func (m *MockFetcher) GetBlockTxs(arg0 context.Context, arg1 []types.TransactionID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlockTxs", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetBlockTxs indicates an expected call of GetBlockTxs.
func (mr *MockFetcherMockRecorder) GetBlockTxs(arg0, arg1 any) *FetcherGetBlockTxsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockTxs", reflect.TypeOf((*MockFetcher)(nil).GetBlockTxs), arg0, arg1)
return &FetcherGetBlockTxsCall{Call: call}
}
// FetcherGetBlockTxsCall wrap *gomock.Call
type FetcherGetBlockTxsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherGetBlockTxsCall) Return(arg0 error) *FetcherGetBlockTxsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherGetBlockTxsCall) Do(f func(context.Context, []types.TransactionID) error) *FetcherGetBlockTxsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherGetBlockTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *FetcherGetBlockTxsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *FetcherGetBlocksCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*MockFetcher)(nil).GetBlocks), arg0, arg1)
return &FetcherGetBlocksCall{Call: call}
}
// FetcherGetBlocksCall wrap *gomock.Call
type FetcherGetBlocksCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherGetBlocksCall) Return(arg0 error) *FetcherGetBlocksCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *FetcherGetBlocksCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *FetcherGetBlocksCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// GetPoetProof mocks base method.
func (m *MockFetcher) GetPoetProof(arg0 context.Context, arg1 types.Hash32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPoetProof", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetPoetProof indicates an expected call of GetPoetProof.
func (mr *MockFetcherMockRecorder) GetPoetProof(arg0, arg1 any) *FetcherGetPoetProofCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPoetProof", reflect.TypeOf((*MockFetcher)(nil).GetPoetProof), arg0, arg1)
return &FetcherGetPoetProofCall{Call: call}
}
// FetcherGetPoetProofCall wrap *gomock.Call
type FetcherGetPoetProofCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherGetPoetProofCall) Return(arg0 error) *FetcherGetPoetProofCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherGetPoetProofCall) Do(f func(context.Context, types.Hash32) error) *FetcherGetPoetProofCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherGetPoetProofCall) DoAndReturn(f func(context.Context, types.Hash32) error) *FetcherGetPoetProofCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// GetProposalTxs mocks base method.
func (m *MockFetcher) GetProposalTxs(arg0 context.Context, arg1 []types.TransactionID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetProposalTxs", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetProposalTxs indicates an expected call of GetProposalTxs.
func (mr *MockFetcherMockRecorder) GetProposalTxs(arg0, arg1 any) *FetcherGetProposalTxsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposalTxs", reflect.TypeOf((*MockFetcher)(nil).GetProposalTxs), arg0, arg1)
return &FetcherGetProposalTxsCall{Call: call}
}
// FetcherGetProposalTxsCall wrap *gomock.Call
type FetcherGetProposalTxsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherGetProposalTxsCall) Return(arg0 error) *FetcherGetProposalTxsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherGetProposalTxsCall) Do(f func(context.Context, []types.TransactionID) error) *FetcherGetProposalTxsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherGetProposalTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *FetcherGetProposalTxsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// GetProposals mocks base method.
func (m *MockFetcher) GetProposals(arg0 context.Context, arg1 []types.ProposalID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetProposals", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetProposals indicates an expected call of GetProposals.
func (mr *MockFetcherMockRecorder) GetProposals(arg0, arg1 any) *FetcherGetProposalsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposals", reflect.TypeOf((*MockFetcher)(nil).GetProposals), arg0, arg1)
return &FetcherGetProposalsCall{Call: call}
}
// FetcherGetProposalsCall wrap *gomock.Call
type FetcherGetProposalsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherGetProposalsCall) Return(arg0 error) *FetcherGetProposalsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherGetProposalsCall) Do(f func(context.Context, []types.ProposalID) error) *FetcherGetProposalsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherGetProposalsCall) DoAndReturn(f func(context.Context, []types.ProposalID) error) *FetcherGetProposalsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *FetcherRegisterPeerHashesCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeerHashes", reflect.TypeOf((*MockFetcher)(nil).RegisterPeerHashes), peer, hashes)
return &FetcherRegisterPeerHashesCall{Call: call}
}
// FetcherRegisterPeerHashesCall wrap *gomock.Call
type FetcherRegisterPeerHashesCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *FetcherRegisterPeerHashesCall) Return() *FetcherRegisterPeerHashesCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *FetcherRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *FetcherRegisterPeerHashesCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *FetcherRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *FetcherRegisterPeerHashesCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockBlockFetcher is a mock of BlockFetcher interface.
type MockBlockFetcher struct {
ctrl *gomock.Controller
recorder *MockBlockFetcherMockRecorder
}
// MockBlockFetcherMockRecorder is the mock recorder for MockBlockFetcher.
type MockBlockFetcherMockRecorder struct {
mock *MockBlockFetcher
}
// NewMockBlockFetcher creates a new mock instance.
func NewMockBlockFetcher(ctrl *gomock.Controller) *MockBlockFetcher {
mock := &MockBlockFetcher{ctrl: ctrl}
mock.recorder = &MockBlockFetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBlockFetcher) EXPECT() *MockBlockFetcherMockRecorder {
return m.recorder
}
// GetBlocks mocks base method.
func (m *MockBlockFetcher) 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 *MockBlockFetcherMockRecorder) GetBlocks(arg0, arg1 any) *BlockFetcherGetBlocksCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocks", reflect.TypeOf((*MockBlockFetcher)(nil).GetBlocks), arg0, arg1)
return &BlockFetcherGetBlocksCall{Call: call}
}
// BlockFetcherGetBlocksCall wrap *gomock.Call
type BlockFetcherGetBlocksCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *BlockFetcherGetBlocksCall) Return(arg0 error) *BlockFetcherGetBlocksCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *BlockFetcherGetBlocksCall) Do(f func(context.Context, []types.BlockID) error) *BlockFetcherGetBlocksCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *BlockFetcherGetBlocksCall) DoAndReturn(f func(context.Context, []types.BlockID) error) *BlockFetcherGetBlocksCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockAtxFetcher is a mock of AtxFetcher interface.
type MockAtxFetcher struct {
ctrl *gomock.Controller
recorder *MockAtxFetcherMockRecorder
}
// MockAtxFetcherMockRecorder is the mock recorder for MockAtxFetcher.
type MockAtxFetcherMockRecorder struct {
mock *MockAtxFetcher
}
// NewMockAtxFetcher creates a new mock instance.
func NewMockAtxFetcher(ctrl *gomock.Controller) *MockAtxFetcher {
mock := &MockAtxFetcher{ctrl: ctrl}
mock.recorder = &MockAtxFetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAtxFetcher) EXPECT() *MockAtxFetcherMockRecorder {
return m.recorder
}
// GetAtxs mocks base method.
func (m *MockAtxFetcher) GetAtxs(arg0 context.Context, arg1 []types.ATXID, arg2 ...system.GetAtxOpt) error {
m.ctrl.T.Helper()
varargs := []any{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetAtxs", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// GetAtxs indicates an expected call of GetAtxs.
func (mr *MockAtxFetcherMockRecorder) GetAtxs(arg0, arg1 any, arg2 ...any) *AtxFetcherGetAtxsCall {
mr.mock.ctrl.T.Helper()
varargs := append([]any{arg0, arg1}, arg2...)
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxs", reflect.TypeOf((*MockAtxFetcher)(nil).GetAtxs), varargs...)
return &AtxFetcherGetAtxsCall{Call: call}
}
// AtxFetcherGetAtxsCall wrap *gomock.Call
type AtxFetcherGetAtxsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *AtxFetcherGetAtxsCall) Return(arg0 error) *AtxFetcherGetAtxsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *AtxFetcherGetAtxsCall) Do(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *AtxFetcherGetAtxsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *AtxFetcherGetAtxsCall) DoAndReturn(f func(context.Context, []types.ATXID, ...system.GetAtxOpt) error) *AtxFetcherGetAtxsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockTxFetcher is a mock of TxFetcher interface.
type MockTxFetcher struct {
ctrl *gomock.Controller
recorder *MockTxFetcherMockRecorder
}
// MockTxFetcherMockRecorder is the mock recorder for MockTxFetcher.
type MockTxFetcherMockRecorder struct {
mock *MockTxFetcher
}
// NewMockTxFetcher creates a new mock instance.
func NewMockTxFetcher(ctrl *gomock.Controller) *MockTxFetcher {
mock := &MockTxFetcher{ctrl: ctrl}
mock.recorder = &MockTxFetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTxFetcher) EXPECT() *MockTxFetcherMockRecorder {
return m.recorder
}
// GetBlockTxs mocks base method.
func (m *MockTxFetcher) GetBlockTxs(arg0 context.Context, arg1 []types.TransactionID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlockTxs", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetBlockTxs indicates an expected call of GetBlockTxs.
func (mr *MockTxFetcherMockRecorder) GetBlockTxs(arg0, arg1 any) *TxFetcherGetBlockTxsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockTxs", reflect.TypeOf((*MockTxFetcher)(nil).GetBlockTxs), arg0, arg1)
return &TxFetcherGetBlockTxsCall{Call: call}
}
// TxFetcherGetBlockTxsCall wrap *gomock.Call
type TxFetcherGetBlockTxsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *TxFetcherGetBlockTxsCall) Return(arg0 error) *TxFetcherGetBlockTxsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *TxFetcherGetBlockTxsCall) Do(f func(context.Context, []types.TransactionID) error) *TxFetcherGetBlockTxsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *TxFetcherGetBlockTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *TxFetcherGetBlockTxsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// GetProposalTxs mocks base method.
func (m *MockTxFetcher) GetProposalTxs(arg0 context.Context, arg1 []types.TransactionID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetProposalTxs", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetProposalTxs indicates an expected call of GetProposalTxs.
func (mr *MockTxFetcherMockRecorder) GetProposalTxs(arg0, arg1 any) *TxFetcherGetProposalTxsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposalTxs", reflect.TypeOf((*MockTxFetcher)(nil).GetProposalTxs), arg0, arg1)
return &TxFetcherGetProposalTxsCall{Call: call}
}
// TxFetcherGetProposalTxsCall wrap *gomock.Call
type TxFetcherGetProposalTxsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *TxFetcherGetProposalTxsCall) Return(arg0 error) *TxFetcherGetProposalTxsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *TxFetcherGetProposalTxsCall) Do(f func(context.Context, []types.TransactionID) error) *TxFetcherGetProposalTxsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *TxFetcherGetProposalTxsCall) DoAndReturn(f func(context.Context, []types.TransactionID) error) *TxFetcherGetProposalTxsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockPoetProofFetcher is a mock of PoetProofFetcher interface.
type MockPoetProofFetcher struct {
ctrl *gomock.Controller
recorder *MockPoetProofFetcherMockRecorder
}
// MockPoetProofFetcherMockRecorder is the mock recorder for MockPoetProofFetcher.
type MockPoetProofFetcherMockRecorder struct {
mock *MockPoetProofFetcher
}
// NewMockPoetProofFetcher creates a new mock instance.
func NewMockPoetProofFetcher(ctrl *gomock.Controller) *MockPoetProofFetcher {
mock := &MockPoetProofFetcher{ctrl: ctrl}
mock.recorder = &MockPoetProofFetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPoetProofFetcher) EXPECT() *MockPoetProofFetcherMockRecorder {
return m.recorder
}
// GetPoetProof mocks base method.
func (m *MockPoetProofFetcher) GetPoetProof(arg0 context.Context, arg1 types.Hash32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPoetProof", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetPoetProof indicates an expected call of GetPoetProof.
func (mr *MockPoetProofFetcherMockRecorder) GetPoetProof(arg0, arg1 any) *PoetProofFetcherGetPoetProofCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPoetProof", reflect.TypeOf((*MockPoetProofFetcher)(nil).GetPoetProof), arg0, arg1)
return &PoetProofFetcherGetPoetProofCall{Call: call}
}
// PoetProofFetcherGetPoetProofCall wrap *gomock.Call
type PoetProofFetcherGetPoetProofCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *PoetProofFetcherGetPoetProofCall) Return(arg0 error) *PoetProofFetcherGetPoetProofCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *PoetProofFetcherGetPoetProofCall) Do(f func(context.Context, types.Hash32) error) *PoetProofFetcherGetPoetProofCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *PoetProofFetcherGetPoetProofCall) DoAndReturn(f func(context.Context, types.Hash32) error) *PoetProofFetcherGetPoetProofCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockBallotFetcher is a mock of BallotFetcher interface.
type MockBallotFetcher struct {
ctrl *gomock.Controller
recorder *MockBallotFetcherMockRecorder
}
// MockBallotFetcherMockRecorder is the mock recorder for MockBallotFetcher.
type MockBallotFetcherMockRecorder struct {
mock *MockBallotFetcher
}
// NewMockBallotFetcher creates a new mock instance.
func NewMockBallotFetcher(ctrl *gomock.Controller) *MockBallotFetcher {
mock := &MockBallotFetcher{ctrl: ctrl}
mock.recorder = &MockBallotFetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBallotFetcher) EXPECT() *MockBallotFetcherMockRecorder {
return m.recorder
}
// GetBallots mocks base method.
func (m *MockBallotFetcher) 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 *MockBallotFetcherMockRecorder) GetBallots(arg0, arg1 any) *BallotFetcherGetBallotsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBallots", reflect.TypeOf((*MockBallotFetcher)(nil).GetBallots), arg0, arg1)
return &BallotFetcherGetBallotsCall{Call: call}
}
// BallotFetcherGetBallotsCall wrap *gomock.Call
type BallotFetcherGetBallotsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *BallotFetcherGetBallotsCall) Return(arg0 error) *BallotFetcherGetBallotsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *BallotFetcherGetBallotsCall) Do(f func(context.Context, []types.BallotID) error) *BallotFetcherGetBallotsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *BallotFetcherGetBallotsCall) DoAndReturn(f func(context.Context, []types.BallotID) error) *BallotFetcherGetBallotsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockProposalFetcher is a mock of ProposalFetcher interface.
type MockProposalFetcher struct {
ctrl *gomock.Controller
recorder *MockProposalFetcherMockRecorder
}
// MockProposalFetcherMockRecorder is the mock recorder for MockProposalFetcher.
type MockProposalFetcherMockRecorder struct {
mock *MockProposalFetcher
}
// NewMockProposalFetcher creates a new mock instance.
func NewMockProposalFetcher(ctrl *gomock.Controller) *MockProposalFetcher {
mock := &MockProposalFetcher{ctrl: ctrl}
mock.recorder = &MockProposalFetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockProposalFetcher) EXPECT() *MockProposalFetcherMockRecorder {
return m.recorder
}
// GetProposals mocks base method.
func (m *MockProposalFetcher) GetProposals(arg0 context.Context, arg1 []types.ProposalID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetProposals", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetProposals indicates an expected call of GetProposals.
func (mr *MockProposalFetcherMockRecorder) GetProposals(arg0, arg1 any) *ProposalFetcherGetProposalsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProposals", reflect.TypeOf((*MockProposalFetcher)(nil).GetProposals), arg0, arg1)
return &ProposalFetcherGetProposalsCall{Call: call}
}
// ProposalFetcherGetProposalsCall wrap *gomock.Call
type ProposalFetcherGetProposalsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ProposalFetcherGetProposalsCall) Return(arg0 error) *ProposalFetcherGetProposalsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ProposalFetcherGetProposalsCall) Do(f func(context.Context, []types.ProposalID) error) *ProposalFetcherGetProposalsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ProposalFetcherGetProposalsCall) DoAndReturn(f func(context.Context, []types.ProposalID) error) *ProposalFetcherGetProposalsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockActiveSetFetcher is a mock of ActiveSetFetcher interface.
type MockActiveSetFetcher struct {
ctrl *gomock.Controller
recorder *MockActiveSetFetcherMockRecorder
}
// MockActiveSetFetcherMockRecorder is the mock recorder for MockActiveSetFetcher.
type MockActiveSetFetcherMockRecorder struct {
mock *MockActiveSetFetcher
}
// NewMockActiveSetFetcher creates a new mock instance.
func NewMockActiveSetFetcher(ctrl *gomock.Controller) *MockActiveSetFetcher {
mock := &MockActiveSetFetcher{ctrl: ctrl}
mock.recorder = &MockActiveSetFetcherMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockActiveSetFetcher) EXPECT() *MockActiveSetFetcherMockRecorder {
return m.recorder
}
// GetActiveSet mocks base method.
func (m *MockActiveSetFetcher) GetActiveSet(arg0 context.Context, arg1 types.Hash32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetActiveSet", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// GetActiveSet indicates an expected call of GetActiveSet.
func (mr *MockActiveSetFetcherMockRecorder) GetActiveSet(arg0, arg1 any) *ActiveSetFetcherGetActiveSetCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActiveSet", reflect.TypeOf((*MockActiveSetFetcher)(nil).GetActiveSet), arg0, arg1)
return &ActiveSetFetcherGetActiveSetCall{Call: call}
}
// ActiveSetFetcherGetActiveSetCall wrap *gomock.Call
type ActiveSetFetcherGetActiveSetCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ActiveSetFetcherGetActiveSetCall) Return(arg0 error) *ActiveSetFetcherGetActiveSetCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ActiveSetFetcherGetActiveSetCall) Do(f func(context.Context, types.Hash32) error) *ActiveSetFetcherGetActiveSetCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ActiveSetFetcherGetActiveSetCall) DoAndReturn(f func(context.Context, types.Hash32) error) *ActiveSetFetcherGetActiveSetCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockPeerTracker is a mock of PeerTracker interface.
type MockPeerTracker struct {
ctrl *gomock.Controller
recorder *MockPeerTrackerMockRecorder
}
// MockPeerTrackerMockRecorder is the mock recorder for MockPeerTracker.
type MockPeerTrackerMockRecorder struct {
mock *MockPeerTracker
}
// NewMockPeerTracker creates a new mock instance.
func NewMockPeerTracker(ctrl *gomock.Controller) *MockPeerTracker {
mock := &MockPeerTracker{ctrl: ctrl}
mock.recorder = &MockPeerTrackerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPeerTracker) EXPECT() *MockPeerTrackerMockRecorder {
return m.recorder
}
// RegisterPeerHashes mocks base method.
func (m *MockPeerTracker) 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 *MockPeerTrackerMockRecorder) RegisterPeerHashes(peer, hashes any) *PeerTrackerRegisterPeerHashesCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterPeerHashes", reflect.TypeOf((*MockPeerTracker)(nil).RegisterPeerHashes), peer, hashes)
return &PeerTrackerRegisterPeerHashesCall{Call: call}
}
// PeerTrackerRegisterPeerHashesCall wrap *gomock.Call
type PeerTrackerRegisterPeerHashesCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *PeerTrackerRegisterPeerHashesCall) Return() *PeerTrackerRegisterPeerHashesCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *PeerTrackerRegisterPeerHashesCall) Do(f func(p2p.Peer, []types.Hash32)) *PeerTrackerRegisterPeerHashesCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *PeerTrackerRegisterPeerHashesCall) DoAndReturn(f func(p2p.Peer, []types.Hash32)) *PeerTrackerRegisterPeerHashesCall {
c.Call = c.Call.DoAndReturn(f)
return c
}