-
Notifications
You must be signed in to change notification settings - Fork 672
/
mock_state.go
271 lines (231 loc) · 9.09 KB
/
mock_state.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
// Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/ava-labs/avalanchego/vms/proposervm/state (interfaces: State)
// Package state is a generated GoMock package.
package state
import (
reflect "reflect"
ids "github.com/ava-labs/avalanchego/ids"
choices "github.com/ava-labs/avalanchego/snow/choices"
block "github.com/ava-labs/avalanchego/vms/proposervm/block"
gomock "go.uber.org/mock/gomock"
)
// MockState is a mock of State interface.
type MockState struct {
ctrl *gomock.Controller
recorder *MockStateMockRecorder
}
// MockStateMockRecorder is the mock recorder for MockState.
type MockStateMockRecorder struct {
mock *MockState
}
// NewMockState creates a new mock instance.
func NewMockState(ctrl *gomock.Controller) *MockState {
mock := &MockState{ctrl: ctrl}
mock.recorder = &MockStateMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockState) EXPECT() *MockStateMockRecorder {
return m.recorder
}
// Commit mocks base method.
func (m *MockState) Commit() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Commit")
ret0, _ := ret[0].(error)
return ret0
}
// Commit indicates an expected call of Commit.
func (mr *MockStateMockRecorder) Commit() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockState)(nil).Commit))
}
// DeleteBlock mocks base method.
func (m *MockState) DeleteBlock(arg0 ids.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteBlock", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteBlock indicates an expected call of DeleteBlock.
func (mr *MockStateMockRecorder) DeleteBlock(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteBlock", reflect.TypeOf((*MockState)(nil).DeleteBlock), arg0)
}
// DeleteBlockIDAtHeight mocks base method.
func (m *MockState) DeleteBlockIDAtHeight(arg0 uint64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteBlockIDAtHeight", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteBlockIDAtHeight indicates an expected call of DeleteBlockIDAtHeight.
func (mr *MockStateMockRecorder) DeleteBlockIDAtHeight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteBlockIDAtHeight", reflect.TypeOf((*MockState)(nil).DeleteBlockIDAtHeight), arg0)
}
// DeleteCheckpoint mocks base method.
func (m *MockState) DeleteCheckpoint() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteCheckpoint")
ret0, _ := ret[0].(error)
return ret0
}
// DeleteCheckpoint indicates an expected call of DeleteCheckpoint.
func (mr *MockStateMockRecorder) DeleteCheckpoint() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCheckpoint", reflect.TypeOf((*MockState)(nil).DeleteCheckpoint))
}
// DeleteLastAccepted mocks base method.
func (m *MockState) DeleteLastAccepted() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteLastAccepted")
ret0, _ := ret[0].(error)
return ret0
}
// DeleteLastAccepted indicates an expected call of DeleteLastAccepted.
func (mr *MockStateMockRecorder) DeleteLastAccepted() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteLastAccepted", reflect.TypeOf((*MockState)(nil).DeleteLastAccepted))
}
// GetBlock mocks base method.
func (m *MockState) GetBlock(arg0 ids.ID) (block.Block, choices.Status, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlock", arg0)
ret0, _ := ret[0].(block.Block)
ret1, _ := ret[1].(choices.Status)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// GetBlock indicates an expected call of GetBlock.
func (mr *MockStateMockRecorder) GetBlock(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockState)(nil).GetBlock), arg0)
}
// GetBlockIDAtHeight mocks base method.
func (m *MockState) GetBlockIDAtHeight(arg0 uint64) (ids.ID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetBlockIDAtHeight", arg0)
ret0, _ := ret[0].(ids.ID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.
func (mr *MockStateMockRecorder) GetBlockIDAtHeight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockIDAtHeight", reflect.TypeOf((*MockState)(nil).GetBlockIDAtHeight), arg0)
}
// GetCheckpoint mocks base method.
func (m *MockState) GetCheckpoint() (ids.ID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCheckpoint")
ret0, _ := ret[0].(ids.ID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCheckpoint indicates an expected call of GetCheckpoint.
func (mr *MockStateMockRecorder) GetCheckpoint() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCheckpoint", reflect.TypeOf((*MockState)(nil).GetCheckpoint))
}
// GetForkHeight mocks base method.
func (m *MockState) GetForkHeight() (uint64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetForkHeight")
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetForkHeight indicates an expected call of GetForkHeight.
func (mr *MockStateMockRecorder) GetForkHeight() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetForkHeight", reflect.TypeOf((*MockState)(nil).GetForkHeight))
}
// GetLastAccepted mocks base method.
func (m *MockState) GetLastAccepted() (ids.ID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLastAccepted")
ret0, _ := ret[0].(ids.ID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetLastAccepted indicates an expected call of GetLastAccepted.
func (mr *MockStateMockRecorder) GetLastAccepted() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLastAccepted", reflect.TypeOf((*MockState)(nil).GetLastAccepted))
}
// GetMinimumHeight mocks base method.
func (m *MockState) GetMinimumHeight() (uint64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMinimumHeight")
ret0, _ := ret[0].(uint64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetMinimumHeight indicates an expected call of GetMinimumHeight.
func (mr *MockStateMockRecorder) GetMinimumHeight() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMinimumHeight", reflect.TypeOf((*MockState)(nil).GetMinimumHeight))
}
// PutBlock mocks base method.
func (m *MockState) PutBlock(arg0 block.Block, arg1 choices.Status) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PutBlock", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// PutBlock indicates an expected call of PutBlock.
func (mr *MockStateMockRecorder) PutBlock(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutBlock", reflect.TypeOf((*MockState)(nil).PutBlock), arg0, arg1)
}
// SetBlockIDAtHeight mocks base method.
func (m *MockState) SetBlockIDAtHeight(arg0 uint64, arg1 ids.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetBlockIDAtHeight", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetBlockIDAtHeight indicates an expected call of SetBlockIDAtHeight.
func (mr *MockStateMockRecorder) SetBlockIDAtHeight(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetBlockIDAtHeight", reflect.TypeOf((*MockState)(nil).SetBlockIDAtHeight), arg0, arg1)
}
// SetCheckpoint mocks base method.
func (m *MockState) SetCheckpoint(arg0 ids.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetCheckpoint", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetCheckpoint indicates an expected call of SetCheckpoint.
func (mr *MockStateMockRecorder) SetCheckpoint(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCheckpoint", reflect.TypeOf((*MockState)(nil).SetCheckpoint), arg0)
}
// SetForkHeight mocks base method.
func (m *MockState) SetForkHeight(arg0 uint64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetForkHeight", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetForkHeight indicates an expected call of SetForkHeight.
func (mr *MockStateMockRecorder) SetForkHeight(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetForkHeight", reflect.TypeOf((*MockState)(nil).SetForkHeight), arg0)
}
// SetLastAccepted mocks base method.
func (m *MockState) SetLastAccepted(arg0 ids.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetLastAccepted", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetLastAccepted indicates an expected call of SetLastAccepted.
func (mr *MockStateMockRecorder) SetLastAccepted(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetLastAccepted", reflect.TypeOf((*MockState)(nil).SetLastAccepted), arg0)
}