-
Notifications
You must be signed in to change notification settings - Fork 211
/
mocks.go
1932 lines (1627 loc) · 65.4 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
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
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
//
// Generated by this command:
//
// mockgen -typed -package=activation -destination=./mocks.go -source=./interface.go
//
// Package activation is a generated GoMock package.
package activation
import (
context "context"
reflect "reflect"
time "time"
types "github.com/spacemeshos/go-spacemesh/common/types"
signing "github.com/spacemeshos/go-spacemesh/signing"
nipost "github.com/spacemeshos/go-spacemesh/sql/localsql/nipost"
shared "github.com/spacemeshos/post/shared"
verifying "github.com/spacemeshos/post/verifying"
gomock "go.uber.org/mock/gomock"
)
// 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 any) *MockAtxReceiverOnAtxCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnAtx", reflect.TypeOf((*MockAtxReceiver)(nil).OnAtx), arg0)
return &MockAtxReceiverOnAtxCall{Call: call}
}
// MockAtxReceiverOnAtxCall wrap *gomock.Call
type MockAtxReceiverOnAtxCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockAtxReceiverOnAtxCall) Return() *MockAtxReceiverOnAtxCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockAtxReceiverOnAtxCall) Do(f func(*types.ActivationTxHeader)) *MockAtxReceiverOnAtxCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockAtxReceiverOnAtxCall) DoAndReturn(f func(*types.ActivationTxHeader)) *MockAtxReceiverOnAtxCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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() *MockPostVerifierCloseCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPostVerifier)(nil).Close))
return &MockPostVerifierCloseCall{Call: call}
}
// MockPostVerifierCloseCall wrap *gomock.Call
type MockPostVerifierCloseCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockPostVerifierCloseCall) Return(arg0 error) *MockPostVerifierCloseCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockPostVerifierCloseCall) Do(f func() error) *MockPostVerifierCloseCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockPostVerifierCloseCall) DoAndReturn(f func() error) *MockPostVerifierCloseCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 := []any{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 any, opts ...any) *MockPostVerifierVerifyCall {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, p, m}, opts...)
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockPostVerifier)(nil).Verify), varargs...)
return &MockPostVerifierVerifyCall{Call: call}
}
// MockPostVerifierVerifyCall wrap *gomock.Call
type MockPostVerifierVerifyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockPostVerifierVerifyCall) Return(arg0 error) *MockPostVerifierVerifyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockPostVerifierVerifyCall) Do(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *MockPostVerifierVerifyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockPostVerifierVerifyCall) DoAndReturn(f func(context.Context, *shared.Proof, *shared.ProofMetadata, ...verifying.OptionFunc) error) *MockPostVerifierVerifyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Mockscaler is a mock of scaler interface.
type Mockscaler struct {
ctrl *gomock.Controller
recorder *MockscalerMockRecorder
}
// MockscalerMockRecorder is the mock recorder for Mockscaler.
type MockscalerMockRecorder struct {
mock *Mockscaler
}
// NewMockscaler creates a new mock instance.
func NewMockscaler(ctrl *gomock.Controller) *Mockscaler {
mock := &Mockscaler{ctrl: ctrl}
mock.recorder = &MockscalerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *Mockscaler) EXPECT() *MockscalerMockRecorder {
return m.recorder
}
// scale mocks base method.
func (m *Mockscaler) scale(arg0 int) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "scale", arg0)
}
// scale indicates an expected call of scale.
func (mr *MockscalerMockRecorder) scale(arg0 any) *MockscalerscaleCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "scale", reflect.TypeOf((*Mockscaler)(nil).scale), arg0)
return &MockscalerscaleCall{Call: call}
}
// MockscalerscaleCall wrap *gomock.Call
type MockscalerscaleCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockscalerscaleCall) Return() *MockscalerscaleCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockscalerscaleCall) Do(f func(int)) *MockscalerscaleCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockscalerscaleCall) DoAndReturn(f func(int)) *MockscalerscaleCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *MocknipostValidatorInitialNIPostChallengeCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialNIPostChallenge", reflect.TypeOf((*MocknipostValidator)(nil).InitialNIPostChallenge), challenge, atxs, goldenATXID)
return &MocknipostValidatorInitialNIPostChallengeCall{Call: call}
}
// MocknipostValidatorInitialNIPostChallengeCall wrap *gomock.Call
type MocknipostValidatorInitialNIPostChallengeCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorInitialNIPostChallengeCall) Return(arg0 error) *MocknipostValidatorInitialNIPostChallengeCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorInitialNIPostChallengeCall) Do(f func(*types.NIPostChallenge, atxProvider, types.ATXID) error) *MocknipostValidatorInitialNIPostChallengeCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorInitialNIPostChallengeCall) DoAndReturn(f func(*types.NIPostChallenge, atxProvider, types.ATXID) error) *MocknipostValidatorInitialNIPostChallengeCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// IsVerifyingFullPost mocks base method.
func (m *MocknipostValidator) IsVerifyingFullPost() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsVerifyingFullPost")
ret0, _ := ret[0].(bool)
return ret0
}
// IsVerifyingFullPost indicates an expected call of IsVerifyingFullPost.
func (mr *MocknipostValidatorMockRecorder) IsVerifyingFullPost() *MocknipostValidatorIsVerifyingFullPostCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsVerifyingFullPost", reflect.TypeOf((*MocknipostValidator)(nil).IsVerifyingFullPost))
return &MocknipostValidatorIsVerifyingFullPostCall{Call: call}
}
// MocknipostValidatorIsVerifyingFullPostCall wrap *gomock.Call
type MocknipostValidatorIsVerifyingFullPostCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorIsVerifyingFullPostCall) Return(arg0 bool) *MocknipostValidatorIsVerifyingFullPostCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorIsVerifyingFullPostCall) Do(f func() bool) *MocknipostValidatorIsVerifyingFullPostCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorIsVerifyingFullPostCall) DoAndReturn(f func() bool) *MocknipostValidatorIsVerifyingFullPostCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// NIPost mocks base method.
func (m *MocknipostValidator) NIPost(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, NIPost *types.NIPost, expectedChallenge types.Hash32, numUnits uint32, opts ...validatorOption) (uint64, error) {
m.ctrl.T.Helper()
varargs := []any{ctx, nodeId, commitmentAtxId, 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, nodeId, commitmentAtxId, NIPost, expectedChallenge, numUnits any, opts ...any) *MocknipostValidatorNIPostCall {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, nodeId, commitmentAtxId, NIPost, expectedChallenge, numUnits}, opts...)
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NIPost", reflect.TypeOf((*MocknipostValidator)(nil).NIPost), varargs...)
return &MocknipostValidatorNIPostCall{Call: call}
}
// MocknipostValidatorNIPostCall wrap *gomock.Call
type MocknipostValidatorNIPostCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorNIPostCall) Return(arg0 uint64, arg1 error) *MocknipostValidatorNIPostCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorNIPostCall) Do(f func(context.Context, types.NodeID, types.ATXID, *types.NIPost, types.Hash32, uint32, ...validatorOption) (uint64, error)) *MocknipostValidatorNIPostCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorNIPostCall) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.NIPost, types.Hash32, uint32, ...validatorOption) (uint64, error)) *MocknipostValidatorNIPostCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *MocknipostValidatorNIPostChallengeCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NIPostChallenge", reflect.TypeOf((*MocknipostValidator)(nil).NIPostChallenge), challenge, atxs, nodeID)
return &MocknipostValidatorNIPostChallengeCall{Call: call}
}
// MocknipostValidatorNIPostChallengeCall wrap *gomock.Call
type MocknipostValidatorNIPostChallengeCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorNIPostChallengeCall) Return(arg0 error) *MocknipostValidatorNIPostChallengeCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorNIPostChallengeCall) Do(f func(*types.NIPostChallenge, atxProvider, types.NodeID) error) *MocknipostValidatorNIPostChallengeCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorNIPostChallengeCall) DoAndReturn(f func(*types.NIPostChallenge, atxProvider, types.NodeID) error) *MocknipostValidatorNIPostChallengeCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *MocknipostValidatorNumUnitsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NumUnits", reflect.TypeOf((*MocknipostValidator)(nil).NumUnits), cfg, numUnits)
return &MocknipostValidatorNumUnitsCall{Call: call}
}
// MocknipostValidatorNumUnitsCall wrap *gomock.Call
type MocknipostValidatorNumUnitsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorNumUnitsCall) Return(arg0 error) *MocknipostValidatorNumUnitsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorNumUnitsCall) Do(f func(*PostConfig, uint32) error) *MocknipostValidatorNumUnitsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorNumUnitsCall) DoAndReturn(f func(*PostConfig, uint32) error) *MocknipostValidatorNumUnitsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// PositioningAtx mocks base method.
func (m *MocknipostValidator) PositioningAtx(id types.ATXID, atxs atxProvider, goldenATXID types.ATXID, pubepoch types.EpochID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PositioningAtx", id, atxs, goldenATXID, pubepoch)
ret0, _ := ret[0].(error)
return ret0
}
// PositioningAtx indicates an expected call of PositioningAtx.
func (mr *MocknipostValidatorMockRecorder) PositioningAtx(id, atxs, goldenATXID, pubepoch any) *MocknipostValidatorPositioningAtxCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PositioningAtx", reflect.TypeOf((*MocknipostValidator)(nil).PositioningAtx), id, atxs, goldenATXID, pubepoch)
return &MocknipostValidatorPositioningAtxCall{Call: call}
}
// MocknipostValidatorPositioningAtxCall wrap *gomock.Call
type MocknipostValidatorPositioningAtxCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorPositioningAtxCall) Return(arg0 error) *MocknipostValidatorPositioningAtxCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorPositioningAtxCall) Do(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *MocknipostValidatorPositioningAtxCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorPositioningAtxCall) DoAndReturn(f func(types.ATXID, atxProvider, types.ATXID, types.EpochID) error) *MocknipostValidatorPositioningAtxCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Post mocks base method.
func (m *MocknipostValidator) Post(ctx context.Context, nodeId types.NodeID, commitmentAtxId types.ATXID, Post *types.Post, PostMetadata *types.PostMetadata, numUnits uint32, opts ...validatorOption) error {
m.ctrl.T.Helper()
varargs := []any{ctx, nodeId, commitmentAtxId, 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, nodeId, commitmentAtxId, Post, PostMetadata, numUnits any, opts ...any) *MocknipostValidatorPostCall {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, nodeId, commitmentAtxId, Post, PostMetadata, numUnits}, opts...)
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MocknipostValidator)(nil).Post), varargs...)
return &MocknipostValidatorPostCall{Call: call}
}
// MocknipostValidatorPostCall wrap *gomock.Call
type MocknipostValidatorPostCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorPostCall) Return(arg0 error) *MocknipostValidatorPostCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorPostCall) Do(f func(context.Context, types.NodeID, types.ATXID, *types.Post, *types.PostMetadata, uint32, ...validatorOption) error) *MocknipostValidatorPostCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorPostCall) DoAndReturn(f func(context.Context, types.NodeID, types.ATXID, *types.Post, *types.PostMetadata, uint32, ...validatorOption) error) *MocknipostValidatorPostCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *MocknipostValidatorPostMetadataCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PostMetadata", reflect.TypeOf((*MocknipostValidator)(nil).PostMetadata), cfg, metadata)
return &MocknipostValidatorPostMetadataCall{Call: call}
}
// MocknipostValidatorPostMetadataCall wrap *gomock.Call
type MocknipostValidatorPostMetadataCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorPostMetadataCall) Return(arg0 error) *MocknipostValidatorPostMetadataCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorPostMetadataCall) Do(f func(*PostConfig, *types.PostMetadata) error) *MocknipostValidatorPostMetadataCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorPostMetadataCall) DoAndReturn(f func(*PostConfig, *types.PostMetadata) error) *MocknipostValidatorPostMetadataCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *MocknipostValidatorVRFNonceCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VRFNonce", reflect.TypeOf((*MocknipostValidator)(nil).VRFNonce), nodeId, commitmentAtxId, vrfNonce, PostMetadata, numUnits)
return &MocknipostValidatorVRFNonceCall{Call: call}
}
// MocknipostValidatorVRFNonceCall wrap *gomock.Call
type MocknipostValidatorVRFNonceCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorVRFNonceCall) Return(arg0 error) *MocknipostValidatorVRFNonceCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorVRFNonceCall) Do(f func(types.NodeID, types.ATXID, *types.VRFPostIndex, *types.PostMetadata, uint32) error) *MocknipostValidatorVRFNonceCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorVRFNonceCall) DoAndReturn(f func(types.NodeID, types.ATXID, *types.VRFPostIndex, *types.PostMetadata, uint32) error) *MocknipostValidatorVRFNonceCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// VerifyChain mocks base method.
func (m *MocknipostValidator) VerifyChain(ctx context.Context, id, goldenATXID types.ATXID, opts ...VerifyChainOption) error {
m.ctrl.T.Helper()
varargs := []any{ctx, id, goldenATXID}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "VerifyChain", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// VerifyChain indicates an expected call of VerifyChain.
func (mr *MocknipostValidatorMockRecorder) VerifyChain(ctx, id, goldenATXID any, opts ...any) *MocknipostValidatorVerifyChainCall {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, id, goldenATXID}, opts...)
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyChain", reflect.TypeOf((*MocknipostValidator)(nil).VerifyChain), varargs...)
return &MocknipostValidatorVerifyChainCall{Call: call}
}
// MocknipostValidatorVerifyChainCall wrap *gomock.Call
type MocknipostValidatorVerifyChainCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostValidatorVerifyChainCall) Return(arg0 error) *MocknipostValidatorVerifyChainCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostValidatorVerifyChainCall) Do(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *MocknipostValidatorVerifyChainCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostValidatorVerifyChainCall) DoAndReturn(f func(context.Context, types.ATXID, types.ATXID, ...VerifyChainOption) error) *MocknipostValidatorVerifyChainCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *MocklayerClockAwaitLayerCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AwaitLayer", reflect.TypeOf((*MocklayerClock)(nil).AwaitLayer), layerID)
return &MocklayerClockAwaitLayerCall{Call: call}
}
// MocklayerClockAwaitLayerCall wrap *gomock.Call
type MocklayerClockAwaitLayerCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocklayerClockAwaitLayerCall) Return(arg0 <-chan struct{}) *MocklayerClockAwaitLayerCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocklayerClockAwaitLayerCall) Do(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocklayerClockAwaitLayerCall) DoAndReturn(f func(types.LayerID) <-chan struct{}) *MocklayerClockAwaitLayerCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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() *MocklayerClockCurrentLayerCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer))
return &MocklayerClockCurrentLayerCall{Call: call}
}
// MocklayerClockCurrentLayerCall wrap *gomock.Call
type MocklayerClockCurrentLayerCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocklayerClockCurrentLayerCall) Return(arg0 types.LayerID) *MocklayerClockCurrentLayerCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocklayerClockCurrentLayerCall) Do(f func() types.LayerID) *MocklayerClockCurrentLayerCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocklayerClockCurrentLayerCall) DoAndReturn(f func() types.LayerID) *MocklayerClockCurrentLayerCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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 any) *MocklayerClockLayerToTimeCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LayerToTime", reflect.TypeOf((*MocklayerClock)(nil).LayerToTime), arg0)
return &MocklayerClockLayerToTimeCall{Call: call}
}
// MocklayerClockLayerToTimeCall wrap *gomock.Call
type MocklayerClockLayerToTimeCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocklayerClockLayerToTimeCall) Return(arg0 time.Time) *MocklayerClockLayerToTimeCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocklayerClockLayerToTimeCall) Do(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocklayerClockLayerToTimeCall) DoAndReturn(f func(types.LayerID) time.Time) *MocklayerClockLayerToTimeCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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, sig *signing.EdSigner, challenge *types.NIPostChallenge) (*nipost.NIPostState, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BuildNIPost", ctx, sig, challenge)
ret0, _ := ret[0].(*nipost.NIPostState)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// BuildNIPost indicates an expected call of BuildNIPost.
func (mr *MocknipostBuilderMockRecorder) BuildNIPost(ctx, sig, challenge any) *MocknipostBuilderBuildNIPostCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildNIPost", reflect.TypeOf((*MocknipostBuilder)(nil).BuildNIPost), ctx, sig, challenge)
return &MocknipostBuilderBuildNIPostCall{Call: call}
}
// MocknipostBuilderBuildNIPostCall wrap *gomock.Call
type MocknipostBuilderBuildNIPostCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostBuilderBuildNIPostCall) Return(arg0 *nipost.NIPostState, arg1 error) *MocknipostBuilderBuildNIPostCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostBuilderBuildNIPostCall) Do(f func(context.Context, *signing.EdSigner, *types.NIPostChallenge) (*nipost.NIPostState, error)) *MocknipostBuilderBuildNIPostCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostBuilderBuildNIPostCall) DoAndReturn(f func(context.Context, *signing.EdSigner, *types.NIPostChallenge) (*nipost.NIPostState, error)) *MocknipostBuilderBuildNIPostCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Proof mocks base method.
func (m *MocknipostBuilder) Proof(ctx context.Context, nodeID types.NodeID, challenge []byte) (*types.Post, *types.PostInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Proof", ctx, nodeID, challenge)
ret0, _ := ret[0].(*types.Post)
ret1, _ := ret[1].(*types.PostInfo)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Proof indicates an expected call of Proof.
func (mr *MocknipostBuilderMockRecorder) Proof(ctx, nodeID, challenge any) *MocknipostBuilderProofCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proof", reflect.TypeOf((*MocknipostBuilder)(nil).Proof), ctx, nodeID, challenge)
return &MocknipostBuilderProofCall{Call: call}
}
// MocknipostBuilderProofCall wrap *gomock.Call
type MocknipostBuilderProofCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostBuilderProofCall) Return(arg0 *types.Post, arg1 *types.PostInfo, arg2 error) *MocknipostBuilderProofCall {
c.Call = c.Call.Return(arg0, arg1, arg2)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostBuilderProofCall) Do(f func(context.Context, types.NodeID, []byte) (*types.Post, *types.PostInfo, error)) *MocknipostBuilderProofCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostBuilderProofCall) DoAndReturn(f func(context.Context, types.NodeID, []byte) (*types.Post, *types.PostInfo, error)) *MocknipostBuilderProofCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// ResetState mocks base method.
func (m *MocknipostBuilder) ResetState(arg0 types.NodeID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ResetState", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// ResetState indicates an expected call of ResetState.
func (mr *MocknipostBuilderMockRecorder) ResetState(arg0 any) *MocknipostBuilderResetStateCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResetState", reflect.TypeOf((*MocknipostBuilder)(nil).ResetState), arg0)
return &MocknipostBuilderResetStateCall{Call: call}
}
// MocknipostBuilderResetStateCall wrap *gomock.Call
type MocknipostBuilderResetStateCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocknipostBuilderResetStateCall) Return(arg0 error) *MocknipostBuilderResetStateCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocknipostBuilderResetStateCall) Do(f func(types.NodeID) error) *MocknipostBuilderResetStateCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocknipostBuilderResetStateCall) DoAndReturn(f func(types.NodeID) error) *MocknipostBuilderResetStateCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// 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() *MocksyncerRegisterForATXSyncedCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterForATXSynced", reflect.TypeOf((*Mocksyncer)(nil).RegisterForATXSynced))
return &MocksyncerRegisterForATXSyncedCall{Call: call}
}
// MocksyncerRegisterForATXSyncedCall wrap *gomock.Call
type MocksyncerRegisterForATXSyncedCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MocksyncerRegisterForATXSyncedCall) Return(arg0 <-chan struct{}) *MocksyncerRegisterForATXSyncedCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MocksyncerRegisterForATXSyncedCall) Do(f func() <-chan struct{}) *MocksyncerRegisterForATXSyncedCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MocksyncerRegisterForATXSyncedCall) DoAndReturn(f func() <-chan struct{}) *MocksyncerRegisterForATXSyncedCall {
c.Call = c.Call.DoAndReturn(f)