-
Notifications
You must be signed in to change notification settings - Fork 210
/
txs_mocks.go
274 lines (233 loc) · 9.41 KB
/
txs_mocks.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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
// Package txs is a generated GoMock package.
package txs
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
types "github.com/spacemeshos/go-spacemesh/common/types"
log "github.com/spacemeshos/go-spacemesh/log"
system "github.com/spacemeshos/go-spacemesh/system"
)
// MockconservativeState is a mock of conservativeState interface.
type MockconservativeState struct {
ctrl *gomock.Controller
recorder *MockconservativeStateMockRecorder
}
// MockconservativeStateMockRecorder is the mock recorder for MockconservativeState.
type MockconservativeStateMockRecorder struct {
mock *MockconservativeState
}
// NewMockconservativeState creates a new mock instance.
func NewMockconservativeState(ctrl *gomock.Controller) *MockconservativeState {
mock := &MockconservativeState{ctrl: ctrl}
mock.recorder = &MockconservativeStateMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockconservativeState) EXPECT() *MockconservativeStateMockRecorder {
return m.recorder
}
// AddToCache mocks base method.
func (m *MockconservativeState) AddToCache(arg0 context.Context, arg1 *types.Transaction) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddToCache", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// AddToCache indicates an expected call of AddToCache.
func (mr *MockconservativeStateMockRecorder) AddToCache(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddToCache", reflect.TypeOf((*MockconservativeState)(nil).AddToCache), arg0, arg1)
}
// AddToDB mocks base method.
func (m *MockconservativeState) AddToDB(arg0 *types.Transaction) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddToDB", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// AddToDB indicates an expected call of AddToDB.
func (mr *MockconservativeStateMockRecorder) AddToDB(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddToDB", reflect.TypeOf((*MockconservativeState)(nil).AddToDB), arg0)
}
// GetMeshTransaction mocks base method.
func (m *MockconservativeState) GetMeshTransaction(arg0 types.TransactionID) (*types.MeshTransaction, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMeshTransaction", arg0)
ret0, _ := ret[0].(*types.MeshTransaction)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetMeshTransaction indicates an expected call of GetMeshTransaction.
func (mr *MockconservativeStateMockRecorder) GetMeshTransaction(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMeshTransaction", reflect.TypeOf((*MockconservativeState)(nil).GetMeshTransaction), arg0)
}
// HasTx mocks base method.
func (m *MockconservativeState) HasTx(arg0 types.TransactionID) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HasTx", arg0)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// HasTx indicates an expected call of HasTx.
func (mr *MockconservativeStateMockRecorder) HasTx(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasTx", reflect.TypeOf((*MockconservativeState)(nil).HasTx), arg0)
}
// Validation mocks base method.
func (m *MockconservativeState) Validation(arg0 types.RawTx) system.ValidationRequest {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Validation", arg0)
ret0, _ := ret[0].(system.ValidationRequest)
return ret0
}
// Validation indicates an expected call of Validation.
func (mr *MockconservativeStateMockRecorder) Validation(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validation", reflect.TypeOf((*MockconservativeState)(nil).Validation), arg0)
}
// MockvmState is a mock of vmState interface.
type MockvmState struct {
ctrl *gomock.Controller
recorder *MockvmStateMockRecorder
}
// MockvmStateMockRecorder is the mock recorder for MockvmState.
type MockvmStateMockRecorder struct {
mock *MockvmState
}
// NewMockvmState creates a new mock instance.
func NewMockvmState(ctrl *gomock.Controller) *MockvmState {
mock := &MockvmState{ctrl: ctrl}
mock.recorder = &MockvmStateMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockvmState) EXPECT() *MockvmStateMockRecorder {
return m.recorder
}
// GetAllAccounts mocks base method.
func (m *MockvmState) GetAllAccounts() ([]*types.Account, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAllAccounts")
ret0, _ := ret[0].([]*types.Account)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAllAccounts indicates an expected call of GetAllAccounts.
func (mr *MockvmStateMockRecorder) GetAllAccounts() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllAccounts", reflect.TypeOf((*MockvmState)(nil).GetAllAccounts))
}
// GetBalance mocks base method.
func (m *MockvmState) GetBalance(arg0 types.Address) (uint64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBalance", arg0)
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetBalance indicates an expected call of GetBalance.
func (mr *MockvmStateMockRecorder) GetBalance(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockvmState)(nil).GetBalance), arg0)
}
// GetLayerApplied mocks base method.
func (m *MockvmState) GetLayerApplied(arg0 types.TransactionID) (types.LayerID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLayerApplied", arg0)
ret0, _ := ret[0].(types.LayerID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetLayerApplied indicates an expected call of GetLayerApplied.
func (mr *MockvmStateMockRecorder) GetLayerApplied(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerApplied", reflect.TypeOf((*MockvmState)(nil).GetLayerApplied), arg0)
}
// GetLayerStateRoot mocks base method.
func (m *MockvmState) GetLayerStateRoot(arg0 types.LayerID) (types.Hash32, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLayerStateRoot", arg0)
ret0, _ := ret[0].(types.Hash32)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetLayerStateRoot indicates an expected call of GetLayerStateRoot.
func (mr *MockvmStateMockRecorder) GetLayerStateRoot(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLayerStateRoot", reflect.TypeOf((*MockvmState)(nil).GetLayerStateRoot), arg0)
}
// GetNonce mocks base method.
func (m *MockvmState) GetNonce(arg0 types.Address) (types.Nonce, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetNonce", arg0)
ret0, _ := ret[0].(types.Nonce)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetNonce indicates an expected call of GetNonce.
func (mr *MockvmStateMockRecorder) GetNonce(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNonce", reflect.TypeOf((*MockvmState)(nil).GetNonce), arg0)
}
// GetStateRoot mocks base method.
func (m *MockvmState) GetStateRoot() (types.Hash32, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetStateRoot")
ret0, _ := ret[0].(types.Hash32)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetStateRoot indicates an expected call of GetStateRoot.
func (mr *MockvmStateMockRecorder) GetStateRoot() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStateRoot", reflect.TypeOf((*MockvmState)(nil).GetStateRoot))
}
// Validation mocks base method.
func (m *MockvmState) Validation(arg0 types.RawTx) system.ValidationRequest {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Validation", arg0)
ret0, _ := ret[0].(system.ValidationRequest)
return ret0
}
// Validation indicates an expected call of Validation.
func (mr *MockvmStateMockRecorder) Validation(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validation", reflect.TypeOf((*MockvmState)(nil).Validation), arg0)
}
// MockconStateCache is a mock of conStateCache interface.
type MockconStateCache struct {
ctrl *gomock.Controller
recorder *MockconStateCacheMockRecorder
}
// MockconStateCacheMockRecorder is the mock recorder for MockconStateCache.
type MockconStateCacheMockRecorder struct {
mock *MockconStateCache
}
// NewMockconStateCache creates a new mock instance.
func NewMockconStateCache(ctrl *gomock.Controller) *MockconStateCache {
mock := &MockconStateCache{ctrl: ctrl}
mock.recorder = &MockconStateCacheMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockconStateCache) EXPECT() *MockconStateCacheMockRecorder {
return m.recorder
}
// GetMempool mocks base method.
func (m *MockconStateCache) GetMempool(arg0 log.Log) map[types.Address][]*NanoTX {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMempool", arg0)
ret0, _ := ret[0].(map[types.Address][]*NanoTX)
return ret0
}
// GetMempool indicates an expected call of GetMempool.
func (mr *MockconStateCacheMockRecorder) GetMempool(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMempool", reflect.TypeOf((*MockconStateCache)(nil).GetMempool), arg0)
}