This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 189
/
engine_mock.go
227 lines (194 loc) · 8.36 KB
/
engine_mock.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/klaytn/klaytn/consensus (interfaces: Engine)
// Package mocks is a generated GoMock package.
package mocks
import (
big "math/big"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
state "github.com/klaytn/klaytn/blockchain/state"
types "github.com/klaytn/klaytn/blockchain/types"
common "github.com/klaytn/klaytn/common"
consensus "github.com/klaytn/klaytn/consensus"
rpc "github.com/klaytn/klaytn/networks/rpc"
)
// MockEngine is a mock of Engine interface.
type MockEngine struct {
ctrl *gomock.Controller
recorder *MockEngineMockRecorder
}
// MockEngineMockRecorder is the mock recorder for MockEngine.
type MockEngineMockRecorder struct {
mock *MockEngine
}
// NewMockEngine creates a new mock instance.
func NewMockEngine(ctrl *gomock.Controller) *MockEngine {
mock := &MockEngine{ctrl: ctrl}
mock.recorder = &MockEngineMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockEngine) EXPECT() *MockEngineMockRecorder {
return m.recorder
}
// APIs mocks base method.
func (m *MockEngine) APIs(arg0 consensus.ChainReader) []rpc.API {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "APIs", arg0)
ret0, _ := ret[0].([]rpc.API)
return ret0
}
// APIs indicates an expected call of APIs.
func (mr *MockEngineMockRecorder) APIs(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIs", reflect.TypeOf((*MockEngine)(nil).APIs), arg0)
}
// Author mocks base method.
func (m *MockEngine) Author(arg0 *types.Header) (common.Address, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Author", arg0)
ret0, _ := ret[0].(common.Address)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Author indicates an expected call of Author.
func (mr *MockEngineMockRecorder) Author(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Author", reflect.TypeOf((*MockEngine)(nil).Author), arg0)
}
// CalcBlockScore mocks base method.
func (m *MockEngine) CalcBlockScore(arg0 consensus.ChainReader, arg1 uint64, arg2 *types.Header) *big.Int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CalcBlockScore", arg0, arg1, arg2)
ret0, _ := ret[0].(*big.Int)
return ret0
}
// CalcBlockScore indicates an expected call of CalcBlockScore.
func (mr *MockEngineMockRecorder) CalcBlockScore(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CalcBlockScore", reflect.TypeOf((*MockEngine)(nil).CalcBlockScore), arg0, arg1, arg2)
}
// CanVerifyHeadersConcurrently mocks base method.
func (m *MockEngine) CanVerifyHeadersConcurrently() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CanVerifyHeadersConcurrently")
ret0, _ := ret[0].(bool)
return ret0
}
// CanVerifyHeadersConcurrently indicates an expected call of CanVerifyHeadersConcurrently.
func (mr *MockEngineMockRecorder) CanVerifyHeadersConcurrently() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CanVerifyHeadersConcurrently", reflect.TypeOf((*MockEngine)(nil).CanVerifyHeadersConcurrently))
}
// CreateSnapshot mocks base method.
func (m *MockEngine) CreateSnapshot(arg0 consensus.ChainReader, arg1 uint64, arg2 common.Hash, arg3 []*types.Header) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateSnapshot", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// CreateSnapshot indicates an expected call of CreateSnapshot.
func (mr *MockEngineMockRecorder) CreateSnapshot(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSnapshot", reflect.TypeOf((*MockEngine)(nil).CreateSnapshot), arg0, arg1, arg2, arg3)
}
// Finalize mocks base method.
func (m *MockEngine) Finalize(arg0 consensus.ChainReader, arg1 *types.Header, arg2 *state.StateDB, arg3 []*types.Transaction, arg4 []*types.Receipt) (*types.Block, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Finalize", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(*types.Block)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Finalize indicates an expected call of Finalize.
func (mr *MockEngineMockRecorder) Finalize(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finalize", reflect.TypeOf((*MockEngine)(nil).Finalize), arg0, arg1, arg2, arg3, arg4)
}
// Prepare mocks base method.
func (m *MockEngine) Prepare(arg0 consensus.ChainReader, arg1 *types.Header) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Prepare", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Prepare indicates an expected call of Prepare.
func (mr *MockEngineMockRecorder) Prepare(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Prepare", reflect.TypeOf((*MockEngine)(nil).Prepare), arg0, arg1)
}
// PreprocessHeaderVerification mocks base method.
func (m *MockEngine) PreprocessHeaderVerification(arg0 []*types.Header) (chan<- struct{}, <-chan error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PreprocessHeaderVerification", arg0)
ret0, _ := ret[0].(chan<- struct{})
ret1, _ := ret[1].(<-chan error)
return ret0, ret1
}
// PreprocessHeaderVerification indicates an expected call of PreprocessHeaderVerification.
func (mr *MockEngineMockRecorder) PreprocessHeaderVerification(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreprocessHeaderVerification", reflect.TypeOf((*MockEngine)(nil).PreprocessHeaderVerification), arg0)
}
// Protocol mocks base method.
func (m *MockEngine) Protocol() consensus.Protocol {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Protocol")
ret0, _ := ret[0].(consensus.Protocol)
return ret0
}
// Protocol indicates an expected call of Protocol.
func (mr *MockEngineMockRecorder) Protocol() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Protocol", reflect.TypeOf((*MockEngine)(nil).Protocol))
}
// Seal mocks base method.
func (m *MockEngine) Seal(arg0 consensus.ChainReader, arg1 *types.Block, arg2 <-chan struct{}) (*types.Block, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Seal", arg0, arg1, arg2)
ret0, _ := ret[0].(*types.Block)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Seal indicates an expected call of Seal.
func (mr *MockEngineMockRecorder) Seal(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Seal", reflect.TypeOf((*MockEngine)(nil).Seal), arg0, arg1, arg2)
}
// VerifyHeader mocks base method.
func (m *MockEngine) VerifyHeader(arg0 consensus.ChainReader, arg1 *types.Header, arg2 bool) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VerifyHeader", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// VerifyHeader indicates an expected call of VerifyHeader.
func (mr *MockEngineMockRecorder) VerifyHeader(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyHeader", reflect.TypeOf((*MockEngine)(nil).VerifyHeader), arg0, arg1, arg2)
}
// VerifyHeaders mocks base method.
func (m *MockEngine) VerifyHeaders(arg0 consensus.ChainReader, arg1 []*types.Header, arg2 []bool) (chan<- struct{}, <-chan error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VerifyHeaders", arg0, arg1, arg2)
ret0, _ := ret[0].(chan<- struct{})
ret1, _ := ret[1].(<-chan error)
return ret0, ret1
}
// VerifyHeaders indicates an expected call of VerifyHeaders.
func (mr *MockEngineMockRecorder) VerifyHeaders(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyHeaders", reflect.TypeOf((*MockEngine)(nil).VerifyHeaders), arg0, arg1, arg2)
}
// VerifySeal mocks base method.
func (m *MockEngine) VerifySeal(arg0 consensus.ChainReader, arg1 *types.Header) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "VerifySeal", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// VerifySeal indicates an expected call of VerifySeal.
func (mr *MockEngineMockRecorder) VerifySeal(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifySeal", reflect.TypeOf((*MockEngine)(nil).VerifySeal), arg0, arg1)
}