-
Notifications
You must be signed in to change notification settings - Fork 179
/
storage.go
808 lines (689 loc) · 29 KB
/
storage.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/onflow/flow-go/storage (interfaces: Blocks,Headers,Payloads,Collections,Commits,Events,ServiceEvents,TransactionResults)
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
flow "github.com/onflow/flow-go/model/flow"
storage "github.com/onflow/flow-go/storage"
transaction "github.com/onflow/flow-go/storage/badger/transaction"
)
// MockBlocks is a mock of Blocks interface.
type MockBlocks struct {
ctrl *gomock.Controller
recorder *MockBlocksMockRecorder
}
// MockBlocksMockRecorder is the mock recorder for MockBlocks.
type MockBlocksMockRecorder struct {
mock *MockBlocks
}
// NewMockBlocks creates a new mock instance.
func NewMockBlocks(ctrl *gomock.Controller) *MockBlocks {
mock := &MockBlocks{ctrl: ctrl}
mock.recorder = &MockBlocksMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockBlocks) EXPECT() *MockBlocksMockRecorder {
return m.recorder
}
// ByCollectionID mocks base method.
func (m *MockBlocks) ByCollectionID(arg0 flow.Identifier) (*flow.Block, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByCollectionID", arg0)
ret0, _ := ret[0].(*flow.Block)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByCollectionID indicates an expected call of ByCollectionID.
func (mr *MockBlocksMockRecorder) ByCollectionID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByCollectionID", reflect.TypeOf((*MockBlocks)(nil).ByCollectionID), arg0)
}
// ByHeight mocks base method.
func (m *MockBlocks) ByHeight(arg0 uint64) (*flow.Block, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByHeight", arg0)
ret0, _ := ret[0].(*flow.Block)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByHeight indicates an expected call of ByHeight.
func (mr *MockBlocksMockRecorder) ByHeight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHeight", reflect.TypeOf((*MockBlocks)(nil).ByHeight), arg0)
}
// ByID mocks base method.
func (m *MockBlocks) ByID(arg0 flow.Identifier) (*flow.Block, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByID", arg0)
ret0, _ := ret[0].(*flow.Block)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByID indicates an expected call of ByID.
func (mr *MockBlocksMockRecorder) ByID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByID", reflect.TypeOf((*MockBlocks)(nil).ByID), arg0)
}
// GetLastFullBlockHeight mocks base method.
func (m *MockBlocks) GetLastFullBlockHeight() (uint64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLastFullBlockHeight")
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetLastFullBlockHeight indicates an expected call of GetLastFullBlockHeight.
func (mr *MockBlocksMockRecorder) GetLastFullBlockHeight() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastFullBlockHeight", reflect.TypeOf((*MockBlocks)(nil).GetLastFullBlockHeight))
}
// IndexBlockForCollections mocks base method.
func (m *MockBlocks) IndexBlockForCollections(arg0 flow.Identifier, arg1 []flow.Identifier) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IndexBlockForCollections", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// IndexBlockForCollections indicates an expected call of IndexBlockForCollections.
func (mr *MockBlocksMockRecorder) IndexBlockForCollections(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IndexBlockForCollections", reflect.TypeOf((*MockBlocks)(nil).IndexBlockForCollections), arg0, arg1)
}
// InsertLastFullBlockHeightIfNotExists mocks base method.
func (m *MockBlocks) InsertLastFullBlockHeightIfNotExists(arg0 uint64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InsertLastFullBlockHeightIfNotExists", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// InsertLastFullBlockHeightIfNotExists indicates an expected call of InsertLastFullBlockHeightIfNotExists.
func (mr *MockBlocksMockRecorder) InsertLastFullBlockHeightIfNotExists(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertLastFullBlockHeightIfNotExists", reflect.TypeOf((*MockBlocks)(nil).InsertLastFullBlockHeightIfNotExists), arg0)
}
// Store mocks base method.
func (m *MockBlocks) Store(arg0 *flow.Block) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Store indicates an expected call of Store.
func (mr *MockBlocksMockRecorder) Store(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockBlocks)(nil).Store), arg0)
}
// StoreTx mocks base method.
func (m *MockBlocks) StoreTx(arg0 *flow.Block) func(*transaction.Tx) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StoreTx", arg0)
ret0, _ := ret[0].(func(*transaction.Tx) error)
return ret0
}
// StoreTx indicates an expected call of StoreTx.
func (mr *MockBlocksMockRecorder) StoreTx(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreTx", reflect.TypeOf((*MockBlocks)(nil).StoreTx), arg0)
}
// UpdateLastFullBlockHeight mocks base method.
func (m *MockBlocks) UpdateLastFullBlockHeight(arg0 uint64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateLastFullBlockHeight", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// UpdateLastFullBlockHeight indicates an expected call of UpdateLastFullBlockHeight.
func (mr *MockBlocksMockRecorder) UpdateLastFullBlockHeight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastFullBlockHeight", reflect.TypeOf((*MockBlocks)(nil).UpdateLastFullBlockHeight), arg0)
}
// MockHeaders is a mock of Headers interface.
type MockHeaders struct {
ctrl *gomock.Controller
recorder *MockHeadersMockRecorder
}
// MockHeadersMockRecorder is the mock recorder for MockHeaders.
type MockHeadersMockRecorder struct {
mock *MockHeaders
}
// NewMockHeaders creates a new mock instance.
func NewMockHeaders(ctrl *gomock.Controller) *MockHeaders {
mock := &MockHeaders{ctrl: ctrl}
mock.recorder = &MockHeadersMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHeaders) EXPECT() *MockHeadersMockRecorder {
return m.recorder
}
// BlockIDByHeight mocks base method.
func (m *MockHeaders) BlockIDByHeight(arg0 uint64) (flow.Identifier, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BlockIDByHeight", arg0)
ret0, _ := ret[0].(flow.Identifier)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// BlockIDByHeight indicates an expected call of BlockIDByHeight.
func (mr *MockHeadersMockRecorder) BlockIDByHeight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockIDByHeight", reflect.TypeOf((*MockHeaders)(nil).BlockIDByHeight), arg0)
}
// ByBlockID mocks base method.
func (m *MockHeaders) ByBlockID(arg0 flow.Identifier) (*flow.Header, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockID", arg0)
ret0, _ := ret[0].(*flow.Header)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockID indicates an expected call of ByBlockID.
func (mr *MockHeadersMockRecorder) ByBlockID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockID", reflect.TypeOf((*MockHeaders)(nil).ByBlockID), arg0)
}
// ByHeight mocks base method.
func (m *MockHeaders) ByHeight(arg0 uint64) (*flow.Header, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByHeight", arg0)
ret0, _ := ret[0].(*flow.Header)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByHeight indicates an expected call of ByHeight.
func (mr *MockHeadersMockRecorder) ByHeight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByHeight", reflect.TypeOf((*MockHeaders)(nil).ByHeight), arg0)
}
// ByParentID mocks base method.
func (m *MockHeaders) ByParentID(arg0 flow.Identifier) ([]*flow.Header, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByParentID", arg0)
ret0, _ := ret[0].([]*flow.Header)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByParentID indicates an expected call of ByParentID.
func (mr *MockHeadersMockRecorder) ByParentID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByParentID", reflect.TypeOf((*MockHeaders)(nil).ByParentID), arg0)
}
// Exists mocks base method.
func (m *MockHeaders) Exists(arg0 flow.Identifier) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Exists", arg0)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Exists indicates an expected call of Exists.
func (mr *MockHeadersMockRecorder) Exists(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockHeaders)(nil).Exists), arg0)
}
// Store mocks base method.
func (m *MockHeaders) Store(arg0 *flow.Header) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Store indicates an expected call of Store.
func (mr *MockHeadersMockRecorder) Store(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockHeaders)(nil).Store), arg0)
}
// MockPayloads is a mock of Payloads interface.
type MockPayloads struct {
ctrl *gomock.Controller
recorder *MockPayloadsMockRecorder
}
// MockPayloadsMockRecorder is the mock recorder for MockPayloads.
type MockPayloadsMockRecorder struct {
mock *MockPayloads
}
// NewMockPayloads creates a new mock instance.
func NewMockPayloads(ctrl *gomock.Controller) *MockPayloads {
mock := &MockPayloads{ctrl: ctrl}
mock.recorder = &MockPayloadsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPayloads) EXPECT() *MockPayloadsMockRecorder {
return m.recorder
}
// ByBlockID mocks base method.
func (m *MockPayloads) ByBlockID(arg0 flow.Identifier) (*flow.Payload, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockID", arg0)
ret0, _ := ret[0].(*flow.Payload)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockID indicates an expected call of ByBlockID.
func (mr *MockPayloadsMockRecorder) ByBlockID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockID", reflect.TypeOf((*MockPayloads)(nil).ByBlockID), arg0)
}
// Store mocks base method.
func (m *MockPayloads) Store(arg0 flow.Identifier, arg1 *flow.Payload) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Store indicates an expected call of Store.
func (mr *MockPayloadsMockRecorder) Store(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockPayloads)(nil).Store), arg0, arg1)
}
// MockCollections is a mock of Collections interface.
type MockCollections struct {
ctrl *gomock.Controller
recorder *MockCollectionsMockRecorder
}
// MockCollectionsMockRecorder is the mock recorder for MockCollections.
type MockCollectionsMockRecorder struct {
mock *MockCollections
}
// NewMockCollections creates a new mock instance.
func NewMockCollections(ctrl *gomock.Controller) *MockCollections {
mock := &MockCollections{ctrl: ctrl}
mock.recorder = &MockCollectionsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCollections) EXPECT() *MockCollectionsMockRecorder {
return m.recorder
}
// ByID mocks base method.
func (m *MockCollections) ByID(arg0 flow.Identifier) (*flow.Collection, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByID", arg0)
ret0, _ := ret[0].(*flow.Collection)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByID indicates an expected call of ByID.
func (mr *MockCollectionsMockRecorder) ByID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByID", reflect.TypeOf((*MockCollections)(nil).ByID), arg0)
}
// LightByID mocks base method.
func (m *MockCollections) LightByID(arg0 flow.Identifier) (*flow.LightCollection, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LightByID", arg0)
ret0, _ := ret[0].(*flow.LightCollection)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LightByID indicates an expected call of LightByID.
func (mr *MockCollectionsMockRecorder) LightByID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LightByID", reflect.TypeOf((*MockCollections)(nil).LightByID), arg0)
}
// LightByTransactionID mocks base method.
func (m *MockCollections) LightByTransactionID(arg0 flow.Identifier) (*flow.LightCollection, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LightByTransactionID", arg0)
ret0, _ := ret[0].(*flow.LightCollection)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LightByTransactionID indicates an expected call of LightByTransactionID.
func (mr *MockCollectionsMockRecorder) LightByTransactionID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LightByTransactionID", reflect.TypeOf((*MockCollections)(nil).LightByTransactionID), arg0)
}
// Remove mocks base method.
func (m *MockCollections) Remove(arg0 flow.Identifier) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Remove", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Remove indicates an expected call of Remove.
func (mr *MockCollectionsMockRecorder) Remove(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockCollections)(nil).Remove), arg0)
}
// Store mocks base method.
func (m *MockCollections) Store(arg0 *flow.Collection) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Store indicates an expected call of Store.
func (mr *MockCollectionsMockRecorder) Store(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockCollections)(nil).Store), arg0)
}
// StoreLight mocks base method.
func (m *MockCollections) StoreLight(arg0 *flow.LightCollection) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StoreLight", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// StoreLight indicates an expected call of StoreLight.
func (mr *MockCollectionsMockRecorder) StoreLight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreLight", reflect.TypeOf((*MockCollections)(nil).StoreLight), arg0)
}
// StoreLightAndIndexByTransaction mocks base method.
func (m *MockCollections) StoreLightAndIndexByTransaction(arg0 *flow.LightCollection) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StoreLightAndIndexByTransaction", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// StoreLightAndIndexByTransaction indicates an expected call of StoreLightAndIndexByTransaction.
func (mr *MockCollectionsMockRecorder) StoreLightAndIndexByTransaction(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StoreLightAndIndexByTransaction", reflect.TypeOf((*MockCollections)(nil).StoreLightAndIndexByTransaction), arg0)
}
// MockCommits is a mock of Commits interface.
type MockCommits struct {
ctrl *gomock.Controller
recorder *MockCommitsMockRecorder
}
// MockCommitsMockRecorder is the mock recorder for MockCommits.
type MockCommitsMockRecorder struct {
mock *MockCommits
}
// NewMockCommits creates a new mock instance.
func NewMockCommits(ctrl *gomock.Controller) *MockCommits {
mock := &MockCommits{ctrl: ctrl}
mock.recorder = &MockCommitsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCommits) EXPECT() *MockCommitsMockRecorder {
return m.recorder
}
// BatchRemoveByBlockID mocks base method.
func (m *MockCommits) BatchRemoveByBlockID(arg0 flow.Identifier, arg1 storage.BatchStorage) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BatchRemoveByBlockID", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// BatchRemoveByBlockID indicates an expected call of BatchRemoveByBlockID.
func (mr *MockCommitsMockRecorder) BatchRemoveByBlockID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchRemoveByBlockID", reflect.TypeOf((*MockCommits)(nil).BatchRemoveByBlockID), arg0, arg1)
}
// BatchStore mocks base method.
func (m *MockCommits) BatchStore(arg0 flow.Identifier, arg1 flow.StateCommitment, arg2 storage.BatchStorage) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BatchStore", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// BatchStore indicates an expected call of BatchStore.
func (mr *MockCommitsMockRecorder) BatchStore(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchStore", reflect.TypeOf((*MockCommits)(nil).BatchStore), arg0, arg1, arg2)
}
// ByBlockID mocks base method.
func (m *MockCommits) ByBlockID(arg0 flow.Identifier) (flow.StateCommitment, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockID", arg0)
ret0, _ := ret[0].(flow.StateCommitment)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockID indicates an expected call of ByBlockID.
func (mr *MockCommitsMockRecorder) ByBlockID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockID", reflect.TypeOf((*MockCommits)(nil).ByBlockID), arg0)
}
// Store mocks base method.
func (m *MockCommits) Store(arg0 flow.Identifier, arg1 flow.StateCommitment) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Store indicates an expected call of Store.
func (mr *MockCommitsMockRecorder) Store(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockCommits)(nil).Store), arg0, arg1)
}
// MockEvents is a mock of Events interface.
type MockEvents struct {
ctrl *gomock.Controller
recorder *MockEventsMockRecorder
}
// MockEventsMockRecorder is the mock recorder for MockEvents.
type MockEventsMockRecorder struct {
mock *MockEvents
}
// NewMockEvents creates a new mock instance.
func NewMockEvents(ctrl *gomock.Controller) *MockEvents {
mock := &MockEvents{ctrl: ctrl}
mock.recorder = &MockEventsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockEvents) EXPECT() *MockEventsMockRecorder {
return m.recorder
}
// BatchRemoveByBlockID mocks base method.
func (m *MockEvents) BatchRemoveByBlockID(arg0 flow.Identifier, arg1 storage.BatchStorage) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BatchRemoveByBlockID", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// BatchRemoveByBlockID indicates an expected call of BatchRemoveByBlockID.
func (mr *MockEventsMockRecorder) BatchRemoveByBlockID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchRemoveByBlockID", reflect.TypeOf((*MockEvents)(nil).BatchRemoveByBlockID), arg0, arg1)
}
// BatchStore mocks base method.
func (m *MockEvents) BatchStore(arg0 flow.Identifier, arg1 []flow.EventsList, arg2 storage.BatchStorage) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BatchStore", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// BatchStore indicates an expected call of BatchStore.
func (mr *MockEventsMockRecorder) BatchStore(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchStore", reflect.TypeOf((*MockEvents)(nil).BatchStore), arg0, arg1, arg2)
}
// ByBlockID mocks base method.
func (m *MockEvents) ByBlockID(arg0 flow.Identifier) ([]flow.Event, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockID", arg0)
ret0, _ := ret[0].([]flow.Event)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockID indicates an expected call of ByBlockID.
func (mr *MockEventsMockRecorder) ByBlockID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockID", reflect.TypeOf((*MockEvents)(nil).ByBlockID), arg0)
}
// ByBlockIDEventType mocks base method.
func (m *MockEvents) ByBlockIDEventType(arg0 flow.Identifier, arg1 flow.EventType) ([]flow.Event, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockIDEventType", arg0, arg1)
ret0, _ := ret[0].([]flow.Event)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockIDEventType indicates an expected call of ByBlockIDEventType.
func (mr *MockEventsMockRecorder) ByBlockIDEventType(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockIDEventType", reflect.TypeOf((*MockEvents)(nil).ByBlockIDEventType), arg0, arg1)
}
// ByBlockIDTransactionID mocks base method.
func (m *MockEvents) ByBlockIDTransactionID(arg0, arg1 flow.Identifier) ([]flow.Event, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockIDTransactionID", arg0, arg1)
ret0, _ := ret[0].([]flow.Event)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockIDTransactionID indicates an expected call of ByBlockIDTransactionID.
func (mr *MockEventsMockRecorder) ByBlockIDTransactionID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockIDTransactionID", reflect.TypeOf((*MockEvents)(nil).ByBlockIDTransactionID), arg0, arg1)
}
// ByBlockIDTransactionIndex mocks base method.
func (m *MockEvents) ByBlockIDTransactionIndex(arg0 flow.Identifier, arg1 uint32) ([]flow.Event, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockIDTransactionIndex", arg0, arg1)
ret0, _ := ret[0].([]flow.Event)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockIDTransactionIndex indicates an expected call of ByBlockIDTransactionIndex.
func (mr *MockEventsMockRecorder) ByBlockIDTransactionIndex(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockIDTransactionIndex", reflect.TypeOf((*MockEvents)(nil).ByBlockIDTransactionIndex), arg0, arg1)
}
// Store mocks base method.
func (m *MockEvents) Store(arg0 flow.Identifier, arg1 []flow.EventsList) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Store", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Store indicates an expected call of Store.
func (mr *MockEventsMockRecorder) Store(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Store", reflect.TypeOf((*MockEvents)(nil).Store), arg0, arg1)
}
// MockServiceEvents is a mock of ServiceEvents interface.
type MockServiceEvents struct {
ctrl *gomock.Controller
recorder *MockServiceEventsMockRecorder
}
// MockServiceEventsMockRecorder is the mock recorder for MockServiceEvents.
type MockServiceEventsMockRecorder struct {
mock *MockServiceEvents
}
// NewMockServiceEvents creates a new mock instance.
func NewMockServiceEvents(ctrl *gomock.Controller) *MockServiceEvents {
mock := &MockServiceEvents{ctrl: ctrl}
mock.recorder = &MockServiceEventsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockServiceEvents) EXPECT() *MockServiceEventsMockRecorder {
return m.recorder
}
// BatchRemoveByBlockID mocks base method.
func (m *MockServiceEvents) BatchRemoveByBlockID(arg0 flow.Identifier, arg1 storage.BatchStorage) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BatchRemoveByBlockID", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// BatchRemoveByBlockID indicates an expected call of BatchRemoveByBlockID.
func (mr *MockServiceEventsMockRecorder) BatchRemoveByBlockID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchRemoveByBlockID", reflect.TypeOf((*MockServiceEvents)(nil).BatchRemoveByBlockID), arg0, arg1)
}
// BatchStore mocks base method.
func (m *MockServiceEvents) BatchStore(arg0 flow.Identifier, arg1 []flow.Event, arg2 storage.BatchStorage) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BatchStore", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// BatchStore indicates an expected call of BatchStore.
func (mr *MockServiceEventsMockRecorder) BatchStore(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchStore", reflect.TypeOf((*MockServiceEvents)(nil).BatchStore), arg0, arg1, arg2)
}
// ByBlockID mocks base method.
func (m *MockServiceEvents) ByBlockID(arg0 flow.Identifier) ([]flow.Event, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockID", arg0)
ret0, _ := ret[0].([]flow.Event)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockID indicates an expected call of ByBlockID.
func (mr *MockServiceEventsMockRecorder) ByBlockID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockID", reflect.TypeOf((*MockServiceEvents)(nil).ByBlockID), arg0)
}
// MockTransactionResults is a mock of TransactionResults interface.
type MockTransactionResults struct {
ctrl *gomock.Controller
recorder *MockTransactionResultsMockRecorder
}
// MockTransactionResultsMockRecorder is the mock recorder for MockTransactionResults.
type MockTransactionResultsMockRecorder struct {
mock *MockTransactionResults
}
// NewMockTransactionResults creates a new mock instance.
func NewMockTransactionResults(ctrl *gomock.Controller) *MockTransactionResults {
mock := &MockTransactionResults{ctrl: ctrl}
mock.recorder = &MockTransactionResultsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTransactionResults) EXPECT() *MockTransactionResultsMockRecorder {
return m.recorder
}
// BatchStore mocks base method.
func (m *MockTransactionResults) BatchStore(arg0 flow.Identifier, arg1 []flow.TransactionResult, arg2 storage.BatchStorage) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BatchStore", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// BatchStore indicates an expected call of BatchStore.
func (mr *MockTransactionResultsMockRecorder) BatchStore(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchStore", reflect.TypeOf((*MockTransactionResults)(nil).BatchStore), arg0, arg1, arg2)
}
// ByBlockID mocks base method.
func (m *MockTransactionResults) ByBlockID(arg0 flow.Identifier) ([]flow.TransactionResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockID", arg0)
ret0, _ := ret[0].([]flow.TransactionResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockID indicates an expected call of ByBlockID.
func (mr *MockTransactionResultsMockRecorder) ByBlockID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockID", reflect.TypeOf((*MockTransactionResults)(nil).ByBlockID), arg0)
}
// ByBlockIDTransactionID mocks base method.
func (m *MockTransactionResults) ByBlockIDTransactionID(arg0, arg1 flow.Identifier) (*flow.TransactionResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockIDTransactionID", arg0, arg1)
ret0, _ := ret[0].(*flow.TransactionResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockIDTransactionID indicates an expected call of ByBlockIDTransactionID.
func (mr *MockTransactionResultsMockRecorder) ByBlockIDTransactionID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockIDTransactionID", reflect.TypeOf((*MockTransactionResults)(nil).ByBlockIDTransactionID), arg0, arg1)
}
// ByBlockIDTransactionIndex mocks base method.
func (m *MockTransactionResults) ByBlockIDTransactionIndex(arg0 flow.Identifier, arg1 uint32) (*flow.TransactionResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByBlockIDTransactionIndex", arg0, arg1)
ret0, _ := ret[0].(*flow.TransactionResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ByBlockIDTransactionIndex indicates an expected call of ByBlockIDTransactionIndex.
func (mr *MockTransactionResultsMockRecorder) ByBlockIDTransactionIndex(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByBlockIDTransactionIndex", reflect.TypeOf((*MockTransactionResults)(nil).ByBlockIDTransactionIndex), arg0, arg1)
}