-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
3784 lines (3554 loc) · 108 KB
/
types.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 moq; DO NOT EDIT.
// github.com/matryer/moq
package mock
import (
"context"
"github.com/fairblock/dkg-core/cmd/dkgd/cmd/vald/broadcaster/types"
sdkClient "github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/tendermint/libs/bytes"
"github.com/tendermint/tendermint/libs/log"
rpcclient "github.com/tendermint/tendermint/rpc/client"
"github.com/tendermint/tendermint/rpc/core/types"
tenderminttypes "github.com/tendermint/tendermint/types"
"sync"
)
// Ensure, that ClientMock does implement types.Client.
// If this is not the case, regenerate this file with moq.
var _ types.Client = &ClientMock{}
// ClientMock is a mock implementation of types.Client.
//
// func TestSomethingThatUsesClient(t *testing.T) {
//
// // make and configure a mocked types.Client
// mockedClient := &ClientMock{
// ABCIInfoFunc: func(contextMoqParam context.Context) (*coretypes.ResultABCIInfo, error) {
// panic("mock out the ABCIInfo method")
// },
// ABCIQueryFunc: func(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) {
// panic("mock out the ABCIQuery method")
// },
// ABCIQueryWithOptionsFunc: func(ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) {
// panic("mock out the ABCIQueryWithOptions method")
// },
// BlockFunc: func(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) {
// panic("mock out the Block method")
// },
// BlockByHashFunc: func(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error) {
// panic("mock out the BlockByHash method")
// },
// BlockResultsFunc: func(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) {
// panic("mock out the BlockResults method")
// },
// BlockSearchFunc: func(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) {
// panic("mock out the BlockSearch method")
// },
// BlockchainInfoFunc: func(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) {
// panic("mock out the BlockchainInfo method")
// },
// BroadcastEvidenceFunc: func(contextMoqParam context.Context, evidence tenderminttypes.Evidence) (*coretypes.ResultBroadcastEvidence, error) {
// panic("mock out the BroadcastEvidence method")
// },
// BroadcastTxAsyncFunc: func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error) {
// panic("mock out the BroadcastTxAsync method")
// },
// BroadcastTxCommitFunc: func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTxCommit, error) {
// panic("mock out the BroadcastTxCommit method")
// },
// BroadcastTxSyncFunc: func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error) {
// panic("mock out the BroadcastTxSync method")
// },
// CheckTxFunc: func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultCheckTx, error) {
// panic("mock out the CheckTx method")
// },
// CommitFunc: func(ctx context.Context, height *int64) (*coretypes.ResultCommit, error) {
// panic("mock out the Commit method")
// },
// ConsensusParamsFunc: func(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error) {
// panic("mock out the ConsensusParams method")
// },
// ConsensusStateFunc: func(contextMoqParam context.Context) (*coretypes.ResultConsensusState, error) {
// panic("mock out the ConsensusState method")
// },
// DumpConsensusStateFunc: func(contextMoqParam context.Context) (*coretypes.ResultDumpConsensusState, error) {
// panic("mock out the DumpConsensusState method")
// },
// GenesisFunc: func(contextMoqParam context.Context) (*coretypes.ResultGenesis, error) {
// panic("mock out the Genesis method")
// },
// GenesisChunkedFunc: func(contextMoqParam context.Context, v uint) (*coretypes.ResultGenesisChunk, error) {
// panic("mock out the GenesisChunked method")
// },
// HealthFunc: func(contextMoqParam context.Context) (*coretypes.ResultHealth, error) {
// panic("mock out the Health method")
// },
// IsRunningFunc: func() bool {
// panic("mock out the IsRunning method")
// },
// NetInfoFunc: func(contextMoqParam context.Context) (*coretypes.ResultNetInfo, error) {
// panic("mock out the NetInfo method")
// },
// NumUnconfirmedTxsFunc: func(contextMoqParam context.Context) (*coretypes.ResultUnconfirmedTxs, error) {
// panic("mock out the NumUnconfirmedTxs method")
// },
// OnResetFunc: func() error {
// panic("mock out the OnReset method")
// },
// OnStartFunc: func() error {
// panic("mock out the OnStart method")
// },
// OnStopFunc: func() {
// panic("mock out the OnStop method")
// },
// QuitFunc: func() <-chan struct{} {
// panic("mock out the Quit method")
// },
// ResetFunc: func() error {
// panic("mock out the Reset method")
// },
// SetLoggerFunc: func(logger log.Logger) {
// panic("mock out the SetLogger method")
// },
// StartFunc: func() error {
// panic("mock out the Start method")
// },
// StatusFunc: func(contextMoqParam context.Context) (*coretypes.ResultStatus, error) {
// panic("mock out the Status method")
// },
// StopFunc: func() error {
// panic("mock out the Stop method")
// },
// StringFunc: func() string {
// panic("mock out the String method")
// },
// SubscribeFunc: func(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error) {
// panic("mock out the Subscribe method")
// },
// TxFunc: func(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error) {
// panic("mock out the Tx method")
// },
// TxSearchFunc: func(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error) {
// panic("mock out the TxSearch method")
// },
// UnconfirmedTxsFunc: func(ctx context.Context, limit *int) (*coretypes.ResultUnconfirmedTxs, error) {
// panic("mock out the UnconfirmedTxs method")
// },
// UnsubscribeFunc: func(ctx context.Context, subscriber string, query string) error {
// panic("mock out the Unsubscribe method")
// },
// UnsubscribeAllFunc: func(ctx context.Context, subscriber string) error {
// panic("mock out the UnsubscribeAll method")
// },
// ValidatorsFunc: func(ctx context.Context, height *int64, page *int, perPage *int) (*coretypes.ResultValidators, error) {
// panic("mock out the Validators method")
// },
// }
//
// // use mockedClient in code that requires types.Client
// // and then make assertions.
//
// }
type ClientMock struct {
// ABCIInfoFunc mocks the ABCIInfo method.
ABCIInfoFunc func(contextMoqParam context.Context) (*coretypes.ResultABCIInfo, error)
// ABCIQueryFunc mocks the ABCIQuery method.
ABCIQueryFunc func(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error)
// ABCIQueryWithOptionsFunc mocks the ABCIQueryWithOptions method.
ABCIQueryWithOptionsFunc func(ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error)
// BlockFunc mocks the Block method.
BlockFunc func(ctx context.Context, height *int64) (*coretypes.ResultBlock, error)
// BlockByHashFunc mocks the BlockByHash method.
BlockByHashFunc func(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error)
// BlockResultsFunc mocks the BlockResults method.
BlockResultsFunc func(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error)
// BlockSearchFunc mocks the BlockSearch method.
BlockSearchFunc func(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error)
// BlockchainInfoFunc mocks the BlockchainInfo method.
BlockchainInfoFunc func(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error)
// BroadcastEvidenceFunc mocks the BroadcastEvidence method.
BroadcastEvidenceFunc func(contextMoqParam context.Context, evidence tenderminttypes.Evidence) (*coretypes.ResultBroadcastEvidence, error)
// BroadcastTxAsyncFunc mocks the BroadcastTxAsync method.
BroadcastTxAsyncFunc func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error)
// BroadcastTxCommitFunc mocks the BroadcastTxCommit method.
BroadcastTxCommitFunc func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTxCommit, error)
// BroadcastTxSyncFunc mocks the BroadcastTxSync method.
BroadcastTxSyncFunc func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error)
// CheckTxFunc mocks the CheckTx method.
CheckTxFunc func(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultCheckTx, error)
// CommitFunc mocks the Commit method.
CommitFunc func(ctx context.Context, height *int64) (*coretypes.ResultCommit, error)
// ConsensusParamsFunc mocks the ConsensusParams method.
ConsensusParamsFunc func(ctx context.Context, height *int64) (*coretypes.ResultConsensusParams, error)
// ConsensusStateFunc mocks the ConsensusState method.
ConsensusStateFunc func(contextMoqParam context.Context) (*coretypes.ResultConsensusState, error)
// DumpConsensusStateFunc mocks the DumpConsensusState method.
DumpConsensusStateFunc func(contextMoqParam context.Context) (*coretypes.ResultDumpConsensusState, error)
// GenesisFunc mocks the Genesis method.
GenesisFunc func(contextMoqParam context.Context) (*coretypes.ResultGenesis, error)
// GenesisChunkedFunc mocks the GenesisChunked method.
GenesisChunkedFunc func(contextMoqParam context.Context, v uint) (*coretypes.ResultGenesisChunk, error)
// HealthFunc mocks the Health method.
HealthFunc func(contextMoqParam context.Context) (*coretypes.ResultHealth, error)
// IsRunningFunc mocks the IsRunning method.
IsRunningFunc func() bool
// NetInfoFunc mocks the NetInfo method.
NetInfoFunc func(contextMoqParam context.Context) (*coretypes.ResultNetInfo, error)
// NumUnconfirmedTxsFunc mocks the NumUnconfirmedTxs method.
NumUnconfirmedTxsFunc func(contextMoqParam context.Context) (*coretypes.ResultUnconfirmedTxs, error)
// OnResetFunc mocks the OnReset method.
OnResetFunc func() error
// OnStartFunc mocks the OnStart method.
OnStartFunc func() error
// OnStopFunc mocks the OnStop method.
OnStopFunc func()
// QuitFunc mocks the Quit method.
QuitFunc func() <-chan struct{}
// ResetFunc mocks the Reset method.
ResetFunc func() error
// SetLoggerFunc mocks the SetLogger method.
SetLoggerFunc func(logger log.Logger)
// StartFunc mocks the Start method.
StartFunc func() error
// StatusFunc mocks the Status method.
StatusFunc func(contextMoqParam context.Context) (*coretypes.ResultStatus, error)
// StopFunc mocks the Stop method.
StopFunc func() error
// StringFunc mocks the String method.
StringFunc func() string
// SubscribeFunc mocks the Subscribe method.
SubscribeFunc func(ctx context.Context, subscriber string, query string, outCapacity ...int) (<-chan coretypes.ResultEvent, error)
// TxFunc mocks the Tx method.
TxFunc func(ctx context.Context, hash []byte, prove bool) (*coretypes.ResultTx, error)
// TxSearchFunc mocks the TxSearch method.
TxSearchFunc func(ctx context.Context, query string, prove bool, page *int, perPage *int, orderBy string) (*coretypes.ResultTxSearch, error)
// UnconfirmedTxsFunc mocks the UnconfirmedTxs method.
UnconfirmedTxsFunc func(ctx context.Context, limit *int) (*coretypes.ResultUnconfirmedTxs, error)
// UnsubscribeFunc mocks the Unsubscribe method.
UnsubscribeFunc func(ctx context.Context, subscriber string, query string) error
// UnsubscribeAllFunc mocks the UnsubscribeAll method.
UnsubscribeAllFunc func(ctx context.Context, subscriber string) error
// ValidatorsFunc mocks the Validators method.
ValidatorsFunc func(ctx context.Context, height *int64, page *int, perPage *int) (*coretypes.ResultValidators, error)
// calls tracks calls to the methods.
calls struct {
// ABCIInfo holds details about calls to the ABCIInfo method.
ABCIInfo []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
}
// ABCIQuery holds details about calls to the ABCIQuery method.
ABCIQuery []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Path is the path argument value.
Path string
// Data is the data argument value.
Data bytes.HexBytes
}
// ABCIQueryWithOptions holds details about calls to the ABCIQueryWithOptions method.
ABCIQueryWithOptions []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Path is the path argument value.
Path string
// Data is the data argument value.
Data bytes.HexBytes
// Opts is the opts argument value.
Opts rpcclient.ABCIQueryOptions
}
// Block holds details about calls to the Block method.
Block []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Height is the height argument value.
Height *int64
}
// BlockByHash holds details about calls to the BlockByHash method.
BlockByHash []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Hash is the hash argument value.
Hash []byte
}
// BlockResults holds details about calls to the BlockResults method.
BlockResults []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Height is the height argument value.
Height *int64
}
// BlockSearch holds details about calls to the BlockSearch method.
BlockSearch []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Query is the query argument value.
Query string
// Page is the page argument value.
Page *int
// PerPage is the perPage argument value.
PerPage *int
// OrderBy is the orderBy argument value.
OrderBy string
}
// BlockchainInfo holds details about calls to the BlockchainInfo method.
BlockchainInfo []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// MinHeight is the minHeight argument value.
MinHeight int64
// MaxHeight is the maxHeight argument value.
MaxHeight int64
}
// BroadcastEvidence holds details about calls to the BroadcastEvidence method.
BroadcastEvidence []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
// Evidence is the evidence argument value.
Evidence tenderminttypes.Evidence
}
// BroadcastTxAsync holds details about calls to the BroadcastTxAsync method.
BroadcastTxAsync []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
// Tx is the tx argument value.
Tx tenderminttypes.Tx
}
// BroadcastTxCommit holds details about calls to the BroadcastTxCommit method.
BroadcastTxCommit []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
// Tx is the tx argument value.
Tx tenderminttypes.Tx
}
// BroadcastTxSync holds details about calls to the BroadcastTxSync method.
BroadcastTxSync []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
// Tx is the tx argument value.
Tx tenderminttypes.Tx
}
// CheckTx holds details about calls to the CheckTx method.
CheckTx []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
// Tx is the tx argument value.
Tx tenderminttypes.Tx
}
// Commit holds details about calls to the Commit method.
Commit []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Height is the height argument value.
Height *int64
}
// ConsensusParams holds details about calls to the ConsensusParams method.
ConsensusParams []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Height is the height argument value.
Height *int64
}
// ConsensusState holds details about calls to the ConsensusState method.
ConsensusState []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
}
// DumpConsensusState holds details about calls to the DumpConsensusState method.
DumpConsensusState []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
}
// Genesis holds details about calls to the Genesis method.
Genesis []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
}
// GenesisChunked holds details about calls to the GenesisChunked method.
GenesisChunked []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
// V is the v argument value.
V uint
}
// Health holds details about calls to the Health method.
Health []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
}
// IsRunning holds details about calls to the IsRunning method.
IsRunning []struct {
}
// NetInfo holds details about calls to the NetInfo method.
NetInfo []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
}
// NumUnconfirmedTxs holds details about calls to the NumUnconfirmedTxs method.
NumUnconfirmedTxs []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
}
// OnReset holds details about calls to the OnReset method.
OnReset []struct {
}
// OnStart holds details about calls to the OnStart method.
OnStart []struct {
}
// OnStop holds details about calls to the OnStop method.
OnStop []struct {
}
// Quit holds details about calls to the Quit method.
Quit []struct {
}
// Reset holds details about calls to the Reset method.
Reset []struct {
}
// SetLogger holds details about calls to the SetLogger method.
SetLogger []struct {
// Logger is the logger argument value.
Logger log.Logger
}
// Start holds details about calls to the Start method.
Start []struct {
}
// Status holds details about calls to the Status method.
Status []struct {
// ContextMoqParam is the contextMoqParam argument value.
ContextMoqParam context.Context
}
// Stop holds details about calls to the Stop method.
Stop []struct {
}
// String holds details about calls to the String method.
String []struct {
}
// Subscribe holds details about calls to the Subscribe method.
Subscribe []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Subscriber is the subscriber argument value.
Subscriber string
// Query is the query argument value.
Query string
// OutCapacity is the outCapacity argument value.
OutCapacity []int
}
// Tx holds details about calls to the Tx method.
Tx []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Hash is the hash argument value.
Hash []byte
// Prove is the prove argument value.
Prove bool
}
// TxSearch holds details about calls to the TxSearch method.
TxSearch []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Query is the query argument value.
Query string
// Prove is the prove argument value.
Prove bool
// Page is the page argument value.
Page *int
// PerPage is the perPage argument value.
PerPage *int
// OrderBy is the orderBy argument value.
OrderBy string
}
// UnconfirmedTxs holds details about calls to the UnconfirmedTxs method.
UnconfirmedTxs []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Limit is the limit argument value.
Limit *int
}
// Unsubscribe holds details about calls to the Unsubscribe method.
Unsubscribe []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Subscriber is the subscriber argument value.
Subscriber string
// Query is the query argument value.
Query string
}
// UnsubscribeAll holds details about calls to the UnsubscribeAll method.
UnsubscribeAll []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Subscriber is the subscriber argument value.
Subscriber string
}
// Validators holds details about calls to the Validators method.
Validators []struct {
// Ctx is the ctx argument value.
Ctx context.Context
// Height is the height argument value.
Height *int64
// Page is the page argument value.
Page *int
// PerPage is the perPage argument value.
PerPage *int
}
}
lockABCIInfo sync.RWMutex
lockABCIQuery sync.RWMutex
lockABCIQueryWithOptions sync.RWMutex
lockBlock sync.RWMutex
lockBlockByHash sync.RWMutex
lockBlockResults sync.RWMutex
lockBlockSearch sync.RWMutex
lockBlockchainInfo sync.RWMutex
lockBroadcastEvidence sync.RWMutex
lockBroadcastTxAsync sync.RWMutex
lockBroadcastTxCommit sync.RWMutex
lockBroadcastTxSync sync.RWMutex
lockCheckTx sync.RWMutex
lockCommit sync.RWMutex
lockConsensusParams sync.RWMutex
lockConsensusState sync.RWMutex
lockDumpConsensusState sync.RWMutex
lockGenesis sync.RWMutex
lockGenesisChunked sync.RWMutex
lockHealth sync.RWMutex
lockIsRunning sync.RWMutex
lockNetInfo sync.RWMutex
lockNumUnconfirmedTxs sync.RWMutex
lockOnReset sync.RWMutex
lockOnStart sync.RWMutex
lockOnStop sync.RWMutex
lockQuit sync.RWMutex
lockReset sync.RWMutex
lockSetLogger sync.RWMutex
lockStart sync.RWMutex
lockStatus sync.RWMutex
lockStop sync.RWMutex
lockString sync.RWMutex
lockSubscribe sync.RWMutex
lockTx sync.RWMutex
lockTxSearch sync.RWMutex
lockUnconfirmedTxs sync.RWMutex
lockUnsubscribe sync.RWMutex
lockUnsubscribeAll sync.RWMutex
lockValidators sync.RWMutex
}
// ABCIInfo calls ABCIInfoFunc.
func (mock *ClientMock) ABCIInfo(contextMoqParam context.Context) (*coretypes.ResultABCIInfo, error) {
callInfo := struct {
ContextMoqParam context.Context
}{
ContextMoqParam: contextMoqParam,
}
mock.lockABCIInfo.Lock()
mock.calls.ABCIInfo = append(mock.calls.ABCIInfo, callInfo)
mock.lockABCIInfo.Unlock()
if mock.ABCIInfoFunc == nil {
var (
resultABCIInfoOut *coretypes.ResultABCIInfo
errOut error
)
return resultABCIInfoOut, errOut
}
return mock.ABCIInfoFunc(contextMoqParam)
}
// ABCIInfoCalls gets all the calls that were made to ABCIInfo.
// Check the length with:
// len(mockedClient.ABCIInfoCalls())
func (mock *ClientMock) ABCIInfoCalls() []struct {
ContextMoqParam context.Context
} {
var calls []struct {
ContextMoqParam context.Context
}
mock.lockABCIInfo.RLock()
calls = mock.calls.ABCIInfo
mock.lockABCIInfo.RUnlock()
return calls
}
// ABCIQuery calls ABCIQueryFunc.
func (mock *ClientMock) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*coretypes.ResultABCIQuery, error) {
callInfo := struct {
Ctx context.Context
Path string
Data bytes.HexBytes
}{
Ctx: ctx,
Path: path,
Data: data,
}
mock.lockABCIQuery.Lock()
mock.calls.ABCIQuery = append(mock.calls.ABCIQuery, callInfo)
mock.lockABCIQuery.Unlock()
if mock.ABCIQueryFunc == nil {
var (
resultABCIQueryOut *coretypes.ResultABCIQuery
errOut error
)
return resultABCIQueryOut, errOut
}
return mock.ABCIQueryFunc(ctx, path, data)
}
// ABCIQueryCalls gets all the calls that were made to ABCIQuery.
// Check the length with:
// len(mockedClient.ABCIQueryCalls())
func (mock *ClientMock) ABCIQueryCalls() []struct {
Ctx context.Context
Path string
Data bytes.HexBytes
} {
var calls []struct {
Ctx context.Context
Path string
Data bytes.HexBytes
}
mock.lockABCIQuery.RLock()
calls = mock.calls.ABCIQuery
mock.lockABCIQuery.RUnlock()
return calls
}
// ABCIQueryWithOptions calls ABCIQueryWithOptionsFunc.
func (mock *ClientMock) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*coretypes.ResultABCIQuery, error) {
callInfo := struct {
Ctx context.Context
Path string
Data bytes.HexBytes
Opts rpcclient.ABCIQueryOptions
}{
Ctx: ctx,
Path: path,
Data: data,
Opts: opts,
}
mock.lockABCIQueryWithOptions.Lock()
mock.calls.ABCIQueryWithOptions = append(mock.calls.ABCIQueryWithOptions, callInfo)
mock.lockABCIQueryWithOptions.Unlock()
if mock.ABCIQueryWithOptionsFunc == nil {
var (
resultABCIQueryOut *coretypes.ResultABCIQuery
errOut error
)
return resultABCIQueryOut, errOut
}
return mock.ABCIQueryWithOptionsFunc(ctx, path, data, opts)
}
// ABCIQueryWithOptionsCalls gets all the calls that were made to ABCIQueryWithOptions.
// Check the length with:
// len(mockedClient.ABCIQueryWithOptionsCalls())
func (mock *ClientMock) ABCIQueryWithOptionsCalls() []struct {
Ctx context.Context
Path string
Data bytes.HexBytes
Opts rpcclient.ABCIQueryOptions
} {
var calls []struct {
Ctx context.Context
Path string
Data bytes.HexBytes
Opts rpcclient.ABCIQueryOptions
}
mock.lockABCIQueryWithOptions.RLock()
calls = mock.calls.ABCIQueryWithOptions
mock.lockABCIQueryWithOptions.RUnlock()
return calls
}
// Block calls BlockFunc.
func (mock *ClientMock) Block(ctx context.Context, height *int64) (*coretypes.ResultBlock, error) {
callInfo := struct {
Ctx context.Context
Height *int64
}{
Ctx: ctx,
Height: height,
}
mock.lockBlock.Lock()
mock.calls.Block = append(mock.calls.Block, callInfo)
mock.lockBlock.Unlock()
if mock.BlockFunc == nil {
var (
resultBlockOut *coretypes.ResultBlock
errOut error
)
return resultBlockOut, errOut
}
return mock.BlockFunc(ctx, height)
}
// BlockCalls gets all the calls that were made to Block.
// Check the length with:
// len(mockedClient.BlockCalls())
func (mock *ClientMock) BlockCalls() []struct {
Ctx context.Context
Height *int64
} {
var calls []struct {
Ctx context.Context
Height *int64
}
mock.lockBlock.RLock()
calls = mock.calls.Block
mock.lockBlock.RUnlock()
return calls
}
// BlockByHash calls BlockByHashFunc.
func (mock *ClientMock) BlockByHash(ctx context.Context, hash []byte) (*coretypes.ResultBlock, error) {
callInfo := struct {
Ctx context.Context
Hash []byte
}{
Ctx: ctx,
Hash: hash,
}
mock.lockBlockByHash.Lock()
mock.calls.BlockByHash = append(mock.calls.BlockByHash, callInfo)
mock.lockBlockByHash.Unlock()
if mock.BlockByHashFunc == nil {
var (
resultBlockOut *coretypes.ResultBlock
errOut error
)
return resultBlockOut, errOut
}
return mock.BlockByHashFunc(ctx, hash)
}
// BlockByHashCalls gets all the calls that were made to BlockByHash.
// Check the length with:
// len(mockedClient.BlockByHashCalls())
func (mock *ClientMock) BlockByHashCalls() []struct {
Ctx context.Context
Hash []byte
} {
var calls []struct {
Ctx context.Context
Hash []byte
}
mock.lockBlockByHash.RLock()
calls = mock.calls.BlockByHash
mock.lockBlockByHash.RUnlock()
return calls
}
// BlockResults calls BlockResultsFunc.
func (mock *ClientMock) BlockResults(ctx context.Context, height *int64) (*coretypes.ResultBlockResults, error) {
callInfo := struct {
Ctx context.Context
Height *int64
}{
Ctx: ctx,
Height: height,
}
mock.lockBlockResults.Lock()
mock.calls.BlockResults = append(mock.calls.BlockResults, callInfo)
mock.lockBlockResults.Unlock()
if mock.BlockResultsFunc == nil {
var (
resultBlockResultsOut *coretypes.ResultBlockResults
errOut error
)
return resultBlockResultsOut, errOut
}
return mock.BlockResultsFunc(ctx, height)
}
// BlockResultsCalls gets all the calls that were made to BlockResults.
// Check the length with:
// len(mockedClient.BlockResultsCalls())
func (mock *ClientMock) BlockResultsCalls() []struct {
Ctx context.Context
Height *int64
} {
var calls []struct {
Ctx context.Context
Height *int64
}
mock.lockBlockResults.RLock()
calls = mock.calls.BlockResults
mock.lockBlockResults.RUnlock()
return calls
}
// BlockSearch calls BlockSearchFunc.
func (mock *ClientMock) BlockSearch(ctx context.Context, query string, page *int, perPage *int, orderBy string) (*coretypes.ResultBlockSearch, error) {
callInfo := struct {
Ctx context.Context
Query string
Page *int
PerPage *int
OrderBy string
}{
Ctx: ctx,
Query: query,
Page: page,
PerPage: perPage,
OrderBy: orderBy,
}
mock.lockBlockSearch.Lock()
mock.calls.BlockSearch = append(mock.calls.BlockSearch, callInfo)
mock.lockBlockSearch.Unlock()
if mock.BlockSearchFunc == nil {
var (
resultBlockSearchOut *coretypes.ResultBlockSearch
errOut error
)
return resultBlockSearchOut, errOut
}
return mock.BlockSearchFunc(ctx, query, page, perPage, orderBy)
}
// BlockSearchCalls gets all the calls that were made to BlockSearch.
// Check the length with:
// len(mockedClient.BlockSearchCalls())
func (mock *ClientMock) BlockSearchCalls() []struct {
Ctx context.Context
Query string
Page *int
PerPage *int
OrderBy string
} {
var calls []struct {
Ctx context.Context
Query string
Page *int
PerPage *int
OrderBy string
}
mock.lockBlockSearch.RLock()
calls = mock.calls.BlockSearch
mock.lockBlockSearch.RUnlock()
return calls
}
// BlockchainInfo calls BlockchainInfoFunc.
func (mock *ClientMock) BlockchainInfo(ctx context.Context, minHeight int64, maxHeight int64) (*coretypes.ResultBlockchainInfo, error) {
callInfo := struct {
Ctx context.Context
MinHeight int64
MaxHeight int64
}{
Ctx: ctx,
MinHeight: minHeight,
MaxHeight: maxHeight,
}
mock.lockBlockchainInfo.Lock()
mock.calls.BlockchainInfo = append(mock.calls.BlockchainInfo, callInfo)
mock.lockBlockchainInfo.Unlock()
if mock.BlockchainInfoFunc == nil {
var (
resultBlockchainInfoOut *coretypes.ResultBlockchainInfo
errOut error
)
return resultBlockchainInfoOut, errOut
}
return mock.BlockchainInfoFunc(ctx, minHeight, maxHeight)
}
// BlockchainInfoCalls gets all the calls that were made to BlockchainInfo.
// Check the length with:
// len(mockedClient.BlockchainInfoCalls())
func (mock *ClientMock) BlockchainInfoCalls() []struct {
Ctx context.Context
MinHeight int64
MaxHeight int64
} {
var calls []struct {
Ctx context.Context
MinHeight int64
MaxHeight int64
}
mock.lockBlockchainInfo.RLock()
calls = mock.calls.BlockchainInfo
mock.lockBlockchainInfo.RUnlock()
return calls
}
// BroadcastEvidence calls BroadcastEvidenceFunc.
func (mock *ClientMock) BroadcastEvidence(contextMoqParam context.Context, evidence tenderminttypes.Evidence) (*coretypes.ResultBroadcastEvidence, error) {
callInfo := struct {
ContextMoqParam context.Context
Evidence tenderminttypes.Evidence
}{
ContextMoqParam: contextMoqParam,
Evidence: evidence,
}
mock.lockBroadcastEvidence.Lock()
mock.calls.BroadcastEvidence = append(mock.calls.BroadcastEvidence, callInfo)
mock.lockBroadcastEvidence.Unlock()
if mock.BroadcastEvidenceFunc == nil {
var (
resultBroadcastEvidenceOut *coretypes.ResultBroadcastEvidence
errOut error
)
return resultBroadcastEvidenceOut, errOut
}
return mock.BroadcastEvidenceFunc(contextMoqParam, evidence)
}
// BroadcastEvidenceCalls gets all the calls that were made to BroadcastEvidence.
// Check the length with:
// len(mockedClient.BroadcastEvidenceCalls())
func (mock *ClientMock) BroadcastEvidenceCalls() []struct {
ContextMoqParam context.Context
Evidence tenderminttypes.Evidence
} {
var calls []struct {
ContextMoqParam context.Context
Evidence tenderminttypes.Evidence
}
mock.lockBroadcastEvidence.RLock()
calls = mock.calls.BroadcastEvidence
mock.lockBroadcastEvidence.RUnlock()
return calls
}
// BroadcastTxAsync calls BroadcastTxAsyncFunc.
func (mock *ClientMock) BroadcastTxAsync(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTx, error) {
callInfo := struct {
ContextMoqParam context.Context
Tx tenderminttypes.Tx
}{
ContextMoqParam: contextMoqParam,
Tx: tx,
}
mock.lockBroadcastTxAsync.Lock()
mock.calls.BroadcastTxAsync = append(mock.calls.BroadcastTxAsync, callInfo)
mock.lockBroadcastTxAsync.Unlock()
if mock.BroadcastTxAsyncFunc == nil {
var (
resultBroadcastTxOut *coretypes.ResultBroadcastTx
errOut error
)
return resultBroadcastTxOut, errOut
}
return mock.BroadcastTxAsyncFunc(contextMoqParam, tx)
}
// BroadcastTxAsyncCalls gets all the calls that were made to BroadcastTxAsync.
// Check the length with:
// len(mockedClient.BroadcastTxAsyncCalls())
func (mock *ClientMock) BroadcastTxAsyncCalls() []struct {
ContextMoqParam context.Context
Tx tenderminttypes.Tx
} {
var calls []struct {
ContextMoqParam context.Context
Tx tenderminttypes.Tx
}
mock.lockBroadcastTxAsync.RLock()
calls = mock.calls.BroadcastTxAsync
mock.lockBroadcastTxAsync.RUnlock()
return calls
}
// BroadcastTxCommit calls BroadcastTxCommitFunc.
func (mock *ClientMock) BroadcastTxCommit(contextMoqParam context.Context, tx tenderminttypes.Tx) (*coretypes.ResultBroadcastTxCommit, error) {
callInfo := struct {