/
l1_block_checker_integrator.go
176 lines (142 loc) · 6.02 KB
/
l1_block_checker_integrator.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
// Code generated by mockery. DO NOT EDIT.
package mock_syncinterfaces
import (
context "context"
state "github.com/0xPolygonHermez/zkevm-node/state"
mock "github.com/stretchr/testify/mock"
)
// L1BlockCheckerIntegrator is an autogenerated mock type for the L1BlockCheckerIntegrator type
type L1BlockCheckerIntegrator struct {
mock.Mock
}
type L1BlockCheckerIntegrator_Expecter struct {
mock *mock.Mock
}
func (_m *L1BlockCheckerIntegrator) EXPECT() *L1BlockCheckerIntegrator_Expecter {
return &L1BlockCheckerIntegrator_Expecter{mock: &_m.Mock}
}
// CheckReorgWrapper provides a mock function with given fields: ctx, reorgFirstBlockOk, errReportedByReorgFunc
func (_m *L1BlockCheckerIntegrator) CheckReorgWrapper(ctx context.Context, reorgFirstBlockOk *state.Block, errReportedByReorgFunc error) (*state.Block, error) {
ret := _m.Called(ctx, reorgFirstBlockOk, errReportedByReorgFunc)
if len(ret) == 0 {
panic("no return value specified for CheckReorgWrapper")
}
var r0 *state.Block
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *state.Block, error) (*state.Block, error)); ok {
return rf(ctx, reorgFirstBlockOk, errReportedByReorgFunc)
}
if rf, ok := ret.Get(0).(func(context.Context, *state.Block, error) *state.Block); ok {
r0 = rf(ctx, reorgFirstBlockOk, errReportedByReorgFunc)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*state.Block)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *state.Block, error) error); ok {
r1 = rf(ctx, reorgFirstBlockOk, errReportedByReorgFunc)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// L1BlockCheckerIntegrator_CheckReorgWrapper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckReorgWrapper'
type L1BlockCheckerIntegrator_CheckReorgWrapper_Call struct {
*mock.Call
}
// CheckReorgWrapper is a helper method to define mock.On call
// - ctx context.Context
// - reorgFirstBlockOk *state.Block
// - errReportedByReorgFunc error
func (_e *L1BlockCheckerIntegrator_Expecter) CheckReorgWrapper(ctx interface{}, reorgFirstBlockOk interface{}, errReportedByReorgFunc interface{}) *L1BlockCheckerIntegrator_CheckReorgWrapper_Call {
return &L1BlockCheckerIntegrator_CheckReorgWrapper_Call{Call: _e.mock.On("CheckReorgWrapper", ctx, reorgFirstBlockOk, errReportedByReorgFunc)}
}
func (_c *L1BlockCheckerIntegrator_CheckReorgWrapper_Call) Run(run func(ctx context.Context, reorgFirstBlockOk *state.Block, errReportedByReorgFunc error)) *L1BlockCheckerIntegrator_CheckReorgWrapper_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*state.Block), args[2].(error))
})
return _c
}
func (_c *L1BlockCheckerIntegrator_CheckReorgWrapper_Call) Return(_a0 *state.Block, _a1 error) *L1BlockCheckerIntegrator_CheckReorgWrapper_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *L1BlockCheckerIntegrator_CheckReorgWrapper_Call) RunAndReturn(run func(context.Context, *state.Block, error) (*state.Block, error)) *L1BlockCheckerIntegrator_CheckReorgWrapper_Call {
_c.Call.Return(run)
return _c
}
// OnResetState provides a mock function with given fields: ctx
func (_m *L1BlockCheckerIntegrator) OnResetState(ctx context.Context) {
_m.Called(ctx)
}
// L1BlockCheckerIntegrator_OnResetState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnResetState'
type L1BlockCheckerIntegrator_OnResetState_Call struct {
*mock.Call
}
// OnResetState is a helper method to define mock.On call
// - ctx context.Context
func (_e *L1BlockCheckerIntegrator_Expecter) OnResetState(ctx interface{}) *L1BlockCheckerIntegrator_OnResetState_Call {
return &L1BlockCheckerIntegrator_OnResetState_Call{Call: _e.mock.On("OnResetState", ctx)}
}
func (_c *L1BlockCheckerIntegrator_OnResetState_Call) Run(run func(ctx context.Context)) *L1BlockCheckerIntegrator_OnResetState_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *L1BlockCheckerIntegrator_OnResetState_Call) Return() *L1BlockCheckerIntegrator_OnResetState_Call {
_c.Call.Return()
return _c
}
func (_c *L1BlockCheckerIntegrator_OnResetState_Call) RunAndReturn(run func(context.Context)) *L1BlockCheckerIntegrator_OnResetState_Call {
_c.Call.Return(run)
return _c
}
// OnStart provides a mock function with given fields: ctx
func (_m *L1BlockCheckerIntegrator) OnStart(ctx context.Context) error {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for OnStart")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// L1BlockCheckerIntegrator_OnStart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnStart'
type L1BlockCheckerIntegrator_OnStart_Call struct {
*mock.Call
}
// OnStart is a helper method to define mock.On call
// - ctx context.Context
func (_e *L1BlockCheckerIntegrator_Expecter) OnStart(ctx interface{}) *L1BlockCheckerIntegrator_OnStart_Call {
return &L1BlockCheckerIntegrator_OnStart_Call{Call: _e.mock.On("OnStart", ctx)}
}
func (_c *L1BlockCheckerIntegrator_OnStart_Call) Run(run func(ctx context.Context)) *L1BlockCheckerIntegrator_OnStart_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *L1BlockCheckerIntegrator_OnStart_Call) Return(_a0 error) *L1BlockCheckerIntegrator_OnStart_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *L1BlockCheckerIntegrator_OnStart_Call) RunAndReturn(run func(context.Context) error) *L1BlockCheckerIntegrator_OnStart_Call {
_c.Call.Return(run)
return _c
}
// NewL1BlockCheckerIntegrator creates a new instance of L1BlockCheckerIntegrator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewL1BlockCheckerIntegrator(t interface {
mock.TestingT
Cleanup(func())
}) *L1BlockCheckerIntegrator {
mock := &L1BlockCheckerIntegrator{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}