forked from ava-labs/avalanchego
-
Notifications
You must be signed in to change notification settings - Fork 3
/
mock_vm.go
317 lines (271 loc) · 12.1 KB
/
mock_vm.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
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/MetalBlockchain/metalgo/snow/engine/avalanche/vertex (interfaces: DAGVM)
// Package vertex is a generated GoMock package.
package vertex
import (
context "context"
reflect "reflect"
time "time"
manager "github.com/MetalBlockchain/metalgo/database/manager"
ids "github.com/MetalBlockchain/metalgo/ids"
snow "github.com/MetalBlockchain/metalgo/snow"
snowstorm "github.com/MetalBlockchain/metalgo/snow/consensus/snowstorm"
common "github.com/MetalBlockchain/metalgo/snow/engine/common"
version "github.com/MetalBlockchain/metalgo/version"
gomock "github.com/golang/mock/gomock"
)
// MockDAGVM is a mock of DAGVM interface.
type MockDAGVM struct {
ctrl *gomock.Controller
recorder *MockDAGVMMockRecorder
}
// MockDAGVMMockRecorder is the mock recorder for MockDAGVM.
type MockDAGVMMockRecorder struct {
mock *MockDAGVM
}
// NewMockDAGVM creates a new mock instance.
func NewMockDAGVM(ctrl *gomock.Controller) *MockDAGVM {
mock := &MockDAGVM{ctrl: ctrl}
mock.recorder = &MockDAGVMMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDAGVM) EXPECT() *MockDAGVMMockRecorder {
return m.recorder
}
// AppGossip mocks base method.
func (m *MockDAGVM) AppGossip(arg0 context.Context, arg1 ids.NodeID, arg2 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AppGossip", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// AppGossip indicates an expected call of AppGossip.
func (mr *MockDAGVMMockRecorder) AppGossip(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppGossip", reflect.TypeOf((*MockDAGVM)(nil).AppGossip), arg0, arg1, arg2)
}
// AppRequest mocks base method.
func (m *MockDAGVM) AppRequest(arg0 context.Context, arg1 ids.NodeID, arg2 uint32, arg3 time.Time, arg4 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AppRequest", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// AppRequest indicates an expected call of AppRequest.
func (mr *MockDAGVMMockRecorder) AppRequest(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppRequest", reflect.TypeOf((*MockDAGVM)(nil).AppRequest), arg0, arg1, arg2, arg3, arg4)
}
// AppRequestFailed mocks base method.
func (m *MockDAGVM) AppRequestFailed(arg0 context.Context, arg1 ids.NodeID, arg2 uint32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AppRequestFailed", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// AppRequestFailed indicates an expected call of AppRequestFailed.
func (mr *MockDAGVMMockRecorder) AppRequestFailed(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppRequestFailed", reflect.TypeOf((*MockDAGVM)(nil).AppRequestFailed), arg0, arg1, arg2)
}
// AppResponse mocks base method.
func (m *MockDAGVM) AppResponse(arg0 context.Context, arg1 ids.NodeID, arg2 uint32, arg3 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AppResponse", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// AppResponse indicates an expected call of AppResponse.
func (mr *MockDAGVMMockRecorder) AppResponse(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppResponse", reflect.TypeOf((*MockDAGVM)(nil).AppResponse), arg0, arg1, arg2, arg3)
}
// Connected mocks base method.
func (m *MockDAGVM) Connected(arg0 context.Context, arg1 ids.NodeID, arg2 *version.Application) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Connected", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// Connected indicates an expected call of Connected.
func (mr *MockDAGVMMockRecorder) Connected(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connected", reflect.TypeOf((*MockDAGVM)(nil).Connected), arg0, arg1, arg2)
}
// CreateHandlers mocks base method.
func (m *MockDAGVM) CreateHandlers(arg0 context.Context) (map[string]*common.HTTPHandler, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateHandlers", arg0)
ret0, _ := ret[0].(map[string]*common.HTTPHandler)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateHandlers indicates an expected call of CreateHandlers.
func (mr *MockDAGVMMockRecorder) CreateHandlers(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHandlers", reflect.TypeOf((*MockDAGVM)(nil).CreateHandlers), arg0)
}
// CreateStaticHandlers mocks base method.
func (m *MockDAGVM) CreateStaticHandlers(arg0 context.Context) (map[string]*common.HTTPHandler, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateStaticHandlers", arg0)
ret0, _ := ret[0].(map[string]*common.HTTPHandler)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateStaticHandlers indicates an expected call of CreateStaticHandlers.
func (mr *MockDAGVMMockRecorder) CreateStaticHandlers(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateStaticHandlers", reflect.TypeOf((*MockDAGVM)(nil).CreateStaticHandlers), arg0)
}
// CrossChainAppRequest mocks base method.
func (m *MockDAGVM) CrossChainAppRequest(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 time.Time, arg4 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CrossChainAppRequest", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// CrossChainAppRequest indicates an expected call of CrossChainAppRequest.
func (mr *MockDAGVMMockRecorder) CrossChainAppRequest(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppRequest", reflect.TypeOf((*MockDAGVM)(nil).CrossChainAppRequest), arg0, arg1, arg2, arg3, arg4)
}
// CrossChainAppRequestFailed mocks base method.
func (m *MockDAGVM) CrossChainAppRequestFailed(arg0 context.Context, arg1 ids.ID, arg2 uint32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CrossChainAppRequestFailed", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// CrossChainAppRequestFailed indicates an expected call of CrossChainAppRequestFailed.
func (mr *MockDAGVMMockRecorder) CrossChainAppRequestFailed(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppRequestFailed", reflect.TypeOf((*MockDAGVM)(nil).CrossChainAppRequestFailed), arg0, arg1, arg2)
}
// CrossChainAppResponse mocks base method.
func (m *MockDAGVM) CrossChainAppResponse(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CrossChainAppResponse", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// CrossChainAppResponse indicates an expected call of CrossChainAppResponse.
func (mr *MockDAGVMMockRecorder) CrossChainAppResponse(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppResponse", reflect.TypeOf((*MockDAGVM)(nil).CrossChainAppResponse), arg0, arg1, arg2, arg3)
}
// Disconnected mocks base method.
func (m *MockDAGVM) Disconnected(arg0 context.Context, arg1 ids.NodeID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Disconnected", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Disconnected indicates an expected call of Disconnected.
func (mr *MockDAGVMMockRecorder) Disconnected(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnected", reflect.TypeOf((*MockDAGVM)(nil).Disconnected), arg0, arg1)
}
// GetTx mocks base method.
func (m *MockDAGVM) GetTx(arg0 context.Context, arg1 ids.ID) (snowstorm.Tx, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetTx", arg0, arg1)
ret0, _ := ret[0].(snowstorm.Tx)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetTx indicates an expected call of GetTx.
func (mr *MockDAGVMMockRecorder) GetTx(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTx", reflect.TypeOf((*MockDAGVM)(nil).GetTx), arg0, arg1)
}
// HealthCheck mocks base method.
func (m *MockDAGVM) HealthCheck(arg0 context.Context) (interface{}, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HealthCheck", arg0)
ret0, _ := ret[0].(interface{})
ret1, _ := ret[1].(error)
return ret0, ret1
}
// HealthCheck indicates an expected call of HealthCheck.
func (mr *MockDAGVMMockRecorder) HealthCheck(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HealthCheck", reflect.TypeOf((*MockDAGVM)(nil).HealthCheck), arg0)
}
// Initialize mocks base method.
func (m *MockDAGVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 manager.Manager, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.AppSender) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Initialize", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
ret0, _ := ret[0].(error)
return ret0
}
// Initialize indicates an expected call of Initialize.
func (mr *MockDAGVMMockRecorder) Initialize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialize", reflect.TypeOf((*MockDAGVM)(nil).Initialize), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
}
// ParseTx mocks base method.
func (m *MockDAGVM) ParseTx(arg0 context.Context, arg1 []byte) (snowstorm.Tx, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ParseTx", arg0, arg1)
ret0, _ := ret[0].(snowstorm.Tx)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ParseTx indicates an expected call of ParseTx.
func (mr *MockDAGVMMockRecorder) ParseTx(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParseTx", reflect.TypeOf((*MockDAGVM)(nil).ParseTx), arg0, arg1)
}
// PendingTxs mocks base method.
func (m *MockDAGVM) PendingTxs(arg0 context.Context) []snowstorm.Tx {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PendingTxs", arg0)
ret0, _ := ret[0].([]snowstorm.Tx)
return ret0
}
// PendingTxs indicates an expected call of PendingTxs.
func (mr *MockDAGVMMockRecorder) PendingTxs(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PendingTxs", reflect.TypeOf((*MockDAGVM)(nil).PendingTxs), arg0)
}
// SetState mocks base method.
func (m *MockDAGVM) SetState(arg0 context.Context, arg1 snow.State) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetState", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetState indicates an expected call of SetState.
func (mr *MockDAGVMMockRecorder) SetState(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetState", reflect.TypeOf((*MockDAGVM)(nil).SetState), arg0, arg1)
}
// Shutdown mocks base method.
func (m *MockDAGVM) Shutdown(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Shutdown", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Shutdown indicates an expected call of Shutdown.
func (mr *MockDAGVMMockRecorder) Shutdown(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockDAGVM)(nil).Shutdown), arg0)
}
// Version mocks base method.
func (m *MockDAGVM) Version(arg0 context.Context) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Version", arg0)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Version indicates an expected call of Version.
func (mr *MockDAGVMMockRecorder) Version(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockDAGVM)(nil).Version), arg0)
}