-
Notifications
You must be signed in to change notification settings - Fork 212
/
mocks.go
198 lines (167 loc) · 6.92 KB
/
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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
types "github.com/spacemeshos/go-spacemesh/common/types"
vm "github.com/spacemeshos/go-spacemesh/genvm"
)
// 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
}
// LinkTXsWithBlock mocks base method.
func (m *MockconservativeState) LinkTXsWithBlock(arg0 types.LayerID, arg1 types.BlockID, arg2 []types.TransactionID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkTXsWithBlock", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// LinkTXsWithBlock indicates an expected call of LinkTXsWithBlock.
func (mr *MockconservativeStateMockRecorder) LinkTXsWithBlock(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkTXsWithBlock", reflect.TypeOf((*MockconservativeState)(nil).LinkTXsWithBlock), arg0, arg1, arg2)
}
// LinkTXsWithProposal mocks base method.
func (m *MockconservativeState) LinkTXsWithProposal(arg0 types.LayerID, arg1 types.ProposalID, arg2 []types.TransactionID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkTXsWithProposal", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// LinkTXsWithProposal indicates an expected call of LinkTXsWithProposal.
func (mr *MockconservativeStateMockRecorder) LinkTXsWithProposal(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkTXsWithProposal", reflect.TypeOf((*MockconservativeState)(nil).LinkTXsWithProposal), arg0, arg1, arg2)
}
// RevertCache mocks base method.
func (m *MockconservativeState) RevertCache(arg0 types.LayerID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RevertCache", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RevertCache indicates an expected call of RevertCache.
func (mr *MockconservativeStateMockRecorder) RevertCache(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevertCache", reflect.TypeOf((*MockconservativeState)(nil).RevertCache), arg0)
}
// UpdateCache mocks base method.
func (m *MockconservativeState) UpdateCache(arg0 context.Context, arg1 types.LayerID, arg2 types.BlockID, arg3 []types.TransactionWithResult, arg4 []types.Transaction) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateCache", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// UpdateCache indicates an expected call of UpdateCache.
func (mr *MockconservativeStateMockRecorder) UpdateCache(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCache", reflect.TypeOf((*MockconservativeState)(nil).UpdateCache), arg0, arg1, arg2, arg3, arg4)
}
// 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
}
// Apply mocks base method.
func (m *MockvmState) Apply(arg0 vm.ApplyContext, arg1 []types.Transaction, arg2 []types.CoinbaseReward) ([]types.Transaction, []types.TransactionWithResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Apply", arg0, arg1, arg2)
ret0, _ := ret[0].([]types.Transaction)
ret1, _ := ret[1].([]types.TransactionWithResult)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Apply indicates an expected call of Apply.
func (mr *MockvmStateMockRecorder) Apply(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockvmState)(nil).Apply), arg0, arg1, arg2)
}
// 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))
}
// Revert mocks base method.
func (m *MockvmState) Revert(arg0 types.LayerID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Revert", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Revert indicates an expected call of Revert.
func (mr *MockvmStateMockRecorder) Revert(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Revert", reflect.TypeOf((*MockvmState)(nil).Revert), arg0)
}
// MocklayerClock is a mock of layerClock interface.
type MocklayerClock struct {
ctrl *gomock.Controller
recorder *MocklayerClockMockRecorder
}
// MocklayerClockMockRecorder is the mock recorder for MocklayerClock.
type MocklayerClockMockRecorder struct {
mock *MocklayerClock
}
// NewMocklayerClock creates a new mock instance.
func NewMocklayerClock(ctrl *gomock.Controller) *MocklayerClock {
mock := &MocklayerClock{ctrl: ctrl}
mock.recorder = &MocklayerClockMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MocklayerClock) EXPECT() *MocklayerClockMockRecorder {
return m.recorder
}
// CurrentLayer mocks base method.
func (m *MocklayerClock) CurrentLayer() types.LayerID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CurrentLayer")
ret0, _ := ret[0].(types.LayerID)
return ret0
}
// CurrentLayer indicates an expected call of CurrentLayer.
func (mr *MocklayerClockMockRecorder) CurrentLayer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentLayer", reflect.TypeOf((*MocklayerClock)(nil).CurrentLayer))
}