-
Notifications
You must be signed in to change notification settings - Fork 210
/
mocks.go
815 lines (694 loc) · 29.2 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
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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
// Package activation is a generated GoMock package.
package activation
import (
context "context"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
types "github.com/spacemeshos/go-spacemesh/common/types"
proving "github.com/spacemeshos/post/proving"
shared "github.com/spacemeshos/post/shared"
verifying "github.com/spacemeshos/post/verifying"
)
// MockAtxReceiver is a mock of AtxReceiver interface.
type MockAtxReceiver struct {
ctrl *gomock.Controller
recorder *MockAtxReceiverMockRecorder
}
// MockAtxReceiverMockRecorder is the mock recorder for MockAtxReceiver.
type MockAtxReceiverMockRecorder struct {
mock *MockAtxReceiver
}
// NewMockAtxReceiver creates a new mock instance.
func NewMockAtxReceiver(ctrl *gomock.Controller) *MockAtxReceiver {
mock := &MockAtxReceiver{ctrl: ctrl}
mock.recorder = &MockAtxReceiverMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockAtxReceiver) EXPECT() *MockAtxReceiverMockRecorder {
return m.recorder
}
// OnAtx mocks base method.
func (m *MockAtxReceiver) OnAtx(arg0 *types.ActivationTxHeader) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnAtx", arg0)
}
// OnAtx indicates an expected call of OnAtx.
func (mr *MockAtxReceiverMockRecorder) OnAtx(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnAtx", reflect.TypeOf((*MockAtxReceiver)(nil).OnAtx), arg0)
}
// MockPostVerifier is a mock of PostVerifier interface.
type MockPostVerifier struct {
ctrl *gomock.Controller
recorder *MockPostVerifierMockRecorder
}
// MockPostVerifierMockRecorder is the mock recorder for MockPostVerifier.
type MockPostVerifierMockRecorder struct {
mock *MockPostVerifier
}
// NewMockPostVerifier creates a new mock instance.
func NewMockPostVerifier(ctrl *gomock.Controller) *MockPostVerifier {
mock := &MockPostVerifier{ctrl: ctrl}
mock.recorder = &MockPostVerifierMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPostVerifier) EXPECT() *MockPostVerifierMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockPostVerifier) Close() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(error)
return ret0
}
// Close indicates an expected call of Close.
func (mr *MockPostVerifierMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPostVerifier)(nil).Close))
}
// Verify mocks base method.
func (m_2 *MockPostVerifier) Verify(ctx context.Context, p *shared.Proof, m *shared.ProofMetadata, opts ...verifying.OptionFunc) error {
m_2.ctrl.T.Helper()
varargs := []interface{}{ctx, p, m}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m_2.ctrl.Call(m_2, "Verify", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Verify indicates an expected call of Verify.
func (mr *MockPostVerifierMockRecorder) Verify(ctx, p, m interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, p, m}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockPostVerifier)(nil).Verify), varargs...)
}
// MocknipostValidator is a mock of nipostValidator interface.
type MocknipostValidator struct {
ctrl *gomock.Controller
recorder *MocknipostValidatorMockRecorder
}
// MocknipostValidatorMockRecorder is the mock recorder for MocknipostValidator.
type MocknipostValidatorMockRecorder struct {
mock *MocknipostValidator
}
// NewMocknipostValidator creates a new mock instance.
func NewMocknipostValidator(ctrl *gomock.Controller) *MocknipostValidator {
mock := &MocknipostValidator{ctrl: ctrl}
mock.recorder = &MocknipostValidatorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocknipostValidator) EXPECT() *MocknipostValidatorMockRecorder {
return m.recorder
}
// InitialNIPostChallenge mocks base method.
func (m *MocknipostValidator) InitialNIPostChallenge(challenge *types.NIPostChallenge, atxs atxProvider, goldenATXID types.ATXID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InitialNIPostChallenge", challenge, atxs, goldenATXID)
ret0, _ := ret[0].(error)
return ret0
}
// InitialNIPostChallenge indicates an expected call of InitialNIPostChallenge.
func (mr *MocknipostValidatorMockRecorder) InitialNIPostChallenge(challenge, atxs, goldenATXID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialNIPostChallenge", reflect.TypeOf((*MocknipostValidator)(nil).InitialNIPostChallenge), challenge, atxs, goldenATXID)
}
// NIPost mocks base method.
func (m *MocknipostValidator) NIPost(ctx context.Context, publishEpoch types.EpochID, nodeId types.NodeID, atxId types.ATXID, NIPost *types.NIPost, expectedChallenge types.Hash32, numUnits uint32, opts ...verifying.OptionFunc) (uint64, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, publishEpoch, nodeId, atxId, NIPost, expectedChallenge, numUnits}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "NIPost", varargs...)
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NIPost indicates an expected call of NIPost.
func (mr *MocknipostValidatorMockRecorder) NIPost(ctx, publishEpoch, nodeId, atxId, NIPost, expectedChallenge, numUnits interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, publishEpoch, nodeId, atxId, NIPost, expectedChallenge, numUnits}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NIPost", reflect.TypeOf((*MocknipostValidator)(nil).NIPost), varargs...)
}
// NIPostChallenge mocks base method.
func (m *MocknipostValidator) NIPostChallenge(challenge *types.NIPostChallenge, atxs atxProvider, nodeID types.NodeID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NIPostChallenge", challenge, atxs, nodeID)
ret0, _ := ret[0].(error)
return ret0
}
// NIPostChallenge indicates an expected call of NIPostChallenge.
func (mr *MocknipostValidatorMockRecorder) NIPostChallenge(challenge, atxs, nodeID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NIPostChallenge", reflect.TypeOf((*MocknipostValidator)(nil).NIPostChallenge), challenge, atxs, nodeID)
}
// NumUnits mocks base method.
func (m *MocknipostValidator) NumUnits(cfg *PostConfig, numUnits uint32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NumUnits", cfg, numUnits)
ret0, _ := ret[0].(error)
return ret0
}
// NumUnits indicates an expected call of NumUnits.
func (mr *MocknipostValidatorMockRecorder) NumUnits(cfg, numUnits interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NumUnits", reflect.TypeOf((*MocknipostValidator)(nil).NumUnits), cfg, numUnits)
}
// PositioningAtx mocks base method.
func (m *MocknipostValidator) PositioningAtx(id *types.ATXID, atxs atxProvider, goldenATXID types.ATXID, pubepoch types.EpochID, layersPerEpoch uint32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PositioningAtx", id, atxs, goldenATXID, pubepoch, layersPerEpoch)
ret0, _ := ret[0].(error)
return ret0
}
// PositioningAtx indicates an expected call of PositioningAtx.
func (mr *MocknipostValidatorMockRecorder) PositioningAtx(id, atxs, goldenATXID, pubepoch, layersPerEpoch interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PositioningAtx", reflect.TypeOf((*MocknipostValidator)(nil).PositioningAtx), id, atxs, goldenATXID, pubepoch, layersPerEpoch)
}
// Post mocks base method.
func (m *MocknipostValidator) Post(ctx context.Context, publishEpoch types.EpochID, nodeId types.NodeID, atxId types.ATXID, Post *types.Post, PostMetadata *types.PostMetadata, numUnits uint32, opts ...verifying.OptionFunc) error {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, publishEpoch, nodeId, atxId, Post, PostMetadata, numUnits}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Post", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Post indicates an expected call of Post.
func (mr *MocknipostValidatorMockRecorder) Post(ctx, publishEpoch, nodeId, atxId, Post, PostMetadata, numUnits interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, publishEpoch, nodeId, atxId, Post, PostMetadata, numUnits}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MocknipostValidator)(nil).Post), varargs...)
}
// PostMetadata mocks base method.
func (m *MocknipostValidator) PostMetadata(cfg *PostConfig, metadata *types.PostMetadata) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PostMetadata", cfg, metadata)
ret0, _ := ret[0].(error)
return ret0
}
// PostMetadata indicates an expected call of PostMetadata.
func (mr *MocknipostValidatorMockRecorder) PostMetadata(cfg, metadata interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostMetadata", reflect.TypeOf((*MocknipostValidator)(nil).PostMetadata), cfg, metadata)
}
// VRFNonce mocks base method.
func (m *MocknipostValidator) VRFNonce(nodeId types.NodeID, commitmentAtxId types.ATXID, vrfNonce *types.VRFPostIndex, PostMetadata *types.PostMetadata, numUnits uint32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VRFNonce", nodeId, commitmentAtxId, vrfNonce, PostMetadata, numUnits)
ret0, _ := ret[0].(error)
return ret0
}
// VRFNonce indicates an expected call of VRFNonce.
func (mr *MocknipostValidatorMockRecorder) VRFNonce(nodeId, commitmentAtxId, vrfNonce, PostMetadata, numUnits interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VRFNonce", reflect.TypeOf((*MocknipostValidator)(nil).VRFNonce), nodeId, commitmentAtxId, vrfNonce, PostMetadata, numUnits)
}
// 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)
}
// MocknipostBuilder is a mock of nipostBuilder interface.
type MocknipostBuilder struct {
ctrl *gomock.Controller
recorder *MocknipostBuilderMockRecorder
}
// MocknipostBuilderMockRecorder is the mock recorder for MocknipostBuilder.
type MocknipostBuilderMockRecorder struct {
mock *MocknipostBuilder
}
// NewMocknipostBuilder creates a new mock instance.
func NewMocknipostBuilder(ctrl *gomock.Controller) *MocknipostBuilder {
mock := &MocknipostBuilder{ctrl: ctrl}
mock.recorder = &MocknipostBuilderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocknipostBuilder) EXPECT() *MocknipostBuilderMockRecorder {
return m.recorder
}
// BuildNIPost mocks base method.
func (m *MocknipostBuilder) BuildNIPost(ctx context.Context, challenge *types.NIPostChallenge) (*types.NIPost, time.Duration, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BuildNIPost", ctx, challenge)
ret0, _ := ret[0].(*types.NIPost)
ret1, _ := ret[1].(time.Duration)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// BuildNIPost indicates an expected call of BuildNIPost.
func (mr *MocknipostBuilderMockRecorder) BuildNIPost(ctx, challenge interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildNIPost", reflect.TypeOf((*MocknipostBuilder)(nil).BuildNIPost), ctx, challenge)
}
// DataDir mocks base method.
func (m *MocknipostBuilder) DataDir() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DataDir")
ret0, _ := ret[0].(string)
return ret0
}
// DataDir indicates an expected call of DataDir.
func (mr *MocknipostBuilderMockRecorder) DataDir() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DataDir", reflect.TypeOf((*MocknipostBuilder)(nil).DataDir))
}
// UpdatePoETProvers mocks base method.
func (m *MocknipostBuilder) UpdatePoETProvers(arg0 []PoetProvingServiceClient) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UpdatePoETProvers", arg0)
}
// UpdatePoETProvers indicates an expected call of UpdatePoETProvers.
func (mr *MocknipostBuilderMockRecorder) UpdatePoETProvers(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePoETProvers", reflect.TypeOf((*MocknipostBuilder)(nil).UpdatePoETProvers), arg0)
}
// MockatxHandler is a mock of atxHandler interface.
type MockatxHandler struct {
ctrl *gomock.Controller
recorder *MockatxHandlerMockRecorder
}
// MockatxHandlerMockRecorder is the mock recorder for MockatxHandler.
type MockatxHandlerMockRecorder struct {
mock *MockatxHandler
}
// NewMockatxHandler creates a new mock instance.
func NewMockatxHandler(ctrl *gomock.Controller) *MockatxHandler {
mock := &MockatxHandler{ctrl: ctrl}
mock.recorder = &MockatxHandlerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockatxHandler) EXPECT() *MockatxHandlerMockRecorder {
return m.recorder
}
// AwaitAtx mocks base method.
func (m *MockatxHandler) AwaitAtx(id types.ATXID) chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AwaitAtx", id)
ret0, _ := ret[0].(chan struct{})
return ret0
}
// AwaitAtx indicates an expected call of AwaitAtx.
func (mr *MockatxHandlerMockRecorder) AwaitAtx(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AwaitAtx", reflect.TypeOf((*MockatxHandler)(nil).AwaitAtx), id)
}
// UnsubscribeAtx mocks base method.
func (m *MockatxHandler) UnsubscribeAtx(id types.ATXID) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "UnsubscribeAtx", id)
}
// UnsubscribeAtx indicates an expected call of UnsubscribeAtx.
func (mr *MockatxHandlerMockRecorder) UnsubscribeAtx(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnsubscribeAtx", reflect.TypeOf((*MockatxHandler)(nil).UnsubscribeAtx), id)
}
// Mocksyncer is a mock of syncer interface.
type Mocksyncer struct {
ctrl *gomock.Controller
recorder *MocksyncerMockRecorder
}
// MocksyncerMockRecorder is the mock recorder for Mocksyncer.
type MocksyncerMockRecorder struct {
mock *Mocksyncer
}
// NewMocksyncer creates a new mock instance.
func NewMocksyncer(ctrl *gomock.Controller) *Mocksyncer {
mock := &Mocksyncer{ctrl: ctrl}
mock.recorder = &MocksyncerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Mocksyncer) EXPECT() *MocksyncerMockRecorder {
return m.recorder
}
// RegisterForATXSynced mocks base method.
func (m *Mocksyncer) RegisterForATXSynced() chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterForATXSynced")
ret0, _ := ret[0].(chan struct{})
return ret0
}
// RegisterForATXSynced indicates an expected call of RegisterForATXSynced.
func (mr *MocksyncerMockRecorder) RegisterForATXSynced() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterForATXSynced", reflect.TypeOf((*Mocksyncer)(nil).RegisterForATXSynced))
}
// MockatxProvider is a mock of atxProvider interface.
type MockatxProvider struct {
ctrl *gomock.Controller
recorder *MockatxProviderMockRecorder
}
// MockatxProviderMockRecorder is the mock recorder for MockatxProvider.
type MockatxProviderMockRecorder struct {
mock *MockatxProvider
}
// NewMockatxProvider creates a new mock instance.
func NewMockatxProvider(ctrl *gomock.Controller) *MockatxProvider {
mock := &MockatxProvider{ctrl: ctrl}
mock.recorder = &MockatxProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockatxProvider) EXPECT() *MockatxProviderMockRecorder {
return m.recorder
}
// GetAtxHeader mocks base method.
func (m *MockatxProvider) GetAtxHeader(id types.ATXID) (*types.ActivationTxHeader, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAtxHeader", id)
ret0, _ := ret[0].(*types.ActivationTxHeader)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAtxHeader indicates an expected call of GetAtxHeader.
func (mr *MockatxProviderMockRecorder) GetAtxHeader(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAtxHeader", reflect.TypeOf((*MockatxProvider)(nil).GetAtxHeader), id)
}
// MockpostSetupProvider is a mock of postSetupProvider interface.
type MockpostSetupProvider struct {
ctrl *gomock.Controller
recorder *MockpostSetupProviderMockRecorder
}
// MockpostSetupProviderMockRecorder is the mock recorder for MockpostSetupProvider.
type MockpostSetupProviderMockRecorder struct {
mock *MockpostSetupProvider
}
// NewMockpostSetupProvider creates a new mock instance.
func NewMockpostSetupProvider(ctrl *gomock.Controller) *MockpostSetupProvider {
mock := &MockpostSetupProvider{ctrl: ctrl}
mock.recorder = &MockpostSetupProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockpostSetupProvider) EXPECT() *MockpostSetupProviderMockRecorder {
return m.recorder
}
// Benchmark mocks base method.
func (m *MockpostSetupProvider) Benchmark(p PostSetupProvider) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Benchmark", p)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Benchmark indicates an expected call of Benchmark.
func (mr *MockpostSetupProviderMockRecorder) Benchmark(p interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Benchmark", reflect.TypeOf((*MockpostSetupProvider)(nil).Benchmark), p)
}
// CommitmentAtx mocks base method.
func (m *MockpostSetupProvider) CommitmentAtx() (types.ATXID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CommitmentAtx")
ret0, _ := ret[0].(types.ATXID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CommitmentAtx indicates an expected call of CommitmentAtx.
func (mr *MockpostSetupProviderMockRecorder) CommitmentAtx() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitmentAtx", reflect.TypeOf((*MockpostSetupProvider)(nil).CommitmentAtx))
}
// Config mocks base method.
func (m *MockpostSetupProvider) Config() PostConfig {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Config")
ret0, _ := ret[0].(PostConfig)
return ret0
}
// Config indicates an expected call of Config.
func (mr *MockpostSetupProviderMockRecorder) Config() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Config", reflect.TypeOf((*MockpostSetupProvider)(nil).Config))
}
// GenerateProof mocks base method.
func (m *MockpostSetupProvider) GenerateProof(ctx context.Context, challenge []byte, options ...proving.OptionFunc) (*types.Post, *types.PostMetadata, error) {
m.ctrl.T.Helper()
varargs := []interface{}{ctx, challenge}
for _, a := range options {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GenerateProof", varargs...)
ret0, _ := ret[0].(*types.Post)
ret1, _ := ret[1].(*types.PostMetadata)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GenerateProof indicates an expected call of GenerateProof.
func (mr *MockpostSetupProviderMockRecorder) GenerateProof(ctx, challenge interface{}, options ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{ctx, challenge}, options...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerateProof", reflect.TypeOf((*MockpostSetupProvider)(nil).GenerateProof), varargs...)
}
// LastOpts mocks base method.
func (m *MockpostSetupProvider) LastOpts() *PostSetupOpts {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LastOpts")
ret0, _ := ret[0].(*PostSetupOpts)
return ret0
}
// LastOpts indicates an expected call of LastOpts.
func (mr *MockpostSetupProviderMockRecorder) LastOpts() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastOpts", reflect.TypeOf((*MockpostSetupProvider)(nil).LastOpts))
}
// PrepareInitializer mocks base method.
func (m *MockpostSetupProvider) PrepareInitializer(ctx context.Context, opts PostSetupOpts) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PrepareInitializer", ctx, opts)
ret0, _ := ret[0].(error)
return ret0
}
// PrepareInitializer indicates an expected call of PrepareInitializer.
func (mr *MockpostSetupProviderMockRecorder) PrepareInitializer(ctx, opts interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareInitializer", reflect.TypeOf((*MockpostSetupProvider)(nil).PrepareInitializer), ctx, opts)
}
// Providers mocks base method.
func (m *MockpostSetupProvider) Providers() ([]PostSetupProvider, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Providers")
ret0, _ := ret[0].([]PostSetupProvider)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Providers indicates an expected call of Providers.
func (mr *MockpostSetupProviderMockRecorder) Providers() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Providers", reflect.TypeOf((*MockpostSetupProvider)(nil).Providers))
}
// Reset mocks base method.
func (m *MockpostSetupProvider) Reset() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Reset")
ret0, _ := ret[0].(error)
return ret0
}
// Reset indicates an expected call of Reset.
func (mr *MockpostSetupProviderMockRecorder) Reset() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockpostSetupProvider)(nil).Reset))
}
// StartSession mocks base method.
func (m *MockpostSetupProvider) StartSession(context context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StartSession", context)
ret0, _ := ret[0].(error)
return ret0
}
// StartSession indicates an expected call of StartSession.
func (mr *MockpostSetupProviderMockRecorder) StartSession(context interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartSession", reflect.TypeOf((*MockpostSetupProvider)(nil).StartSession), context)
}
// Status mocks base method.
func (m *MockpostSetupProvider) Status() *PostSetupStatus {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Status")
ret0, _ := ret[0].(*PostSetupStatus)
return ret0
}
// Status indicates an expected call of Status.
func (mr *MockpostSetupProviderMockRecorder) Status() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockpostSetupProvider)(nil).Status))
}
// VRFNonce mocks base method.
func (m *MockpostSetupProvider) VRFNonce() (*types.VRFPostIndex, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VRFNonce")
ret0, _ := ret[0].(*types.VRFPostIndex)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// VRFNonce indicates an expected call of VRFNonce.
func (mr *MockpostSetupProviderMockRecorder) VRFNonce() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VRFNonce", reflect.TypeOf((*MockpostSetupProvider)(nil).VRFNonce))
}
// MockSmeshingProvider is a mock of SmeshingProvider interface.
type MockSmeshingProvider struct {
ctrl *gomock.Controller
recorder *MockSmeshingProviderMockRecorder
}
// MockSmeshingProviderMockRecorder is the mock recorder for MockSmeshingProvider.
type MockSmeshingProviderMockRecorder struct {
mock *MockSmeshingProvider
}
// NewMockSmeshingProvider creates a new mock instance.
func NewMockSmeshingProvider(ctrl *gomock.Controller) *MockSmeshingProvider {
mock := &MockSmeshingProvider{ctrl: ctrl}
mock.recorder = &MockSmeshingProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSmeshingProvider) EXPECT() *MockSmeshingProviderMockRecorder {
return m.recorder
}
// Coinbase mocks base method.
func (m *MockSmeshingProvider) Coinbase() types.Address {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Coinbase")
ret0, _ := ret[0].(types.Address)
return ret0
}
// Coinbase indicates an expected call of Coinbase.
func (mr *MockSmeshingProviderMockRecorder) Coinbase() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Coinbase", reflect.TypeOf((*MockSmeshingProvider)(nil).Coinbase))
}
// SetCoinbase mocks base method.
func (m *MockSmeshingProvider) SetCoinbase(coinbase types.Address) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetCoinbase", coinbase)
}
// SetCoinbase indicates an expected call of SetCoinbase.
func (mr *MockSmeshingProviderMockRecorder) SetCoinbase(coinbase interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCoinbase", reflect.TypeOf((*MockSmeshingProvider)(nil).SetCoinbase), coinbase)
}
// SmesherID mocks base method.
func (m *MockSmeshingProvider) SmesherID() types.NodeID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SmesherID")
ret0, _ := ret[0].(types.NodeID)
return ret0
}
// SmesherID indicates an expected call of SmesherID.
func (mr *MockSmeshingProviderMockRecorder) SmesherID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SmesherID", reflect.TypeOf((*MockSmeshingProvider)(nil).SmesherID))
}
// Smeshing mocks base method.
func (m *MockSmeshingProvider) Smeshing() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Smeshing")
ret0, _ := ret[0].(bool)
return ret0
}
// Smeshing indicates an expected call of Smeshing.
func (mr *MockSmeshingProviderMockRecorder) Smeshing() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Smeshing", reflect.TypeOf((*MockSmeshingProvider)(nil).Smeshing))
}
// StartSmeshing mocks base method.
func (m *MockSmeshingProvider) StartSmeshing(arg0 types.Address, arg1 PostSetupOpts) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StartSmeshing", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// StartSmeshing indicates an expected call of StartSmeshing.
func (mr *MockSmeshingProviderMockRecorder) StartSmeshing(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartSmeshing", reflect.TypeOf((*MockSmeshingProvider)(nil).StartSmeshing), arg0, arg1)
}
// StopSmeshing mocks base method.
func (m *MockSmeshingProvider) StopSmeshing(arg0 bool) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StopSmeshing", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// StopSmeshing indicates an expected call of StopSmeshing.
func (mr *MockSmeshingProviderMockRecorder) StopSmeshing(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopSmeshing", reflect.TypeOf((*MockSmeshingProvider)(nil).StopSmeshing), arg0)
}
// UpdatePoETServers mocks base method.
func (m *MockSmeshingProvider) UpdatePoETServers(ctx context.Context, endpoints []string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdatePoETServers", ctx, endpoints)
ret0, _ := ret[0].(error)
return ret0
}
// UpdatePoETServers indicates an expected call of UpdatePoETServers.
func (mr *MockSmeshingProviderMockRecorder) UpdatePoETServers(ctx, endpoints interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePoETServers", reflect.TypeOf((*MockSmeshingProvider)(nil).UpdatePoETServers), ctx, endpoints)
}