This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
/
vm_mock.go
162 lines (136 loc) · 4.94 KB
/
vm_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
// Copyright (C) 2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
//
// Code generated by MockGen. DO NOT EDIT.
// Source: ./chain/vm.go
// Package chain is a generated GoMock package.
package chain
import (
reflect "reflect"
database "github.com/ava-labs/avalanchego/database"
ids "github.com/ava-labs/avalanchego/ids"
gomock "github.com/golang/mock/gomock"
)
// MockVM is a mock of VM interface.
type MockVM struct {
ctrl *gomock.Controller
recorder *MockVMMockRecorder
}
// MockVMMockRecorder is the mock recorder for MockVM.
type MockVMMockRecorder struct {
mock *MockVM
}
// NewMockVM creates a new mock instance.
func NewMockVM(ctrl *gomock.Controller) *MockVM {
mock := &MockVM{ctrl: ctrl}
mock.recorder = &MockVMMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockVM) EXPECT() *MockVMMockRecorder {
return m.recorder
}
// Accepted mocks base method.
func (m *MockVM) Accepted(arg0 *StatelessBlock) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Accepted", arg0)
}
// Accepted indicates an expected call of Accepted.
func (mr *MockVMMockRecorder) Accepted(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Accepted", reflect.TypeOf((*MockVM)(nil).Accepted), arg0)
}
// ExecutionContext mocks base method.
func (m *MockVM) ExecutionContext(currentTime int64, parent *StatelessBlock) (*Context, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ExecutionContext", currentTime, parent)
ret0, _ := ret[0].(*Context)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ExecutionContext indicates an expected call of ExecutionContext.
func (mr *MockVMMockRecorder) ExecutionContext(currentTime, parent interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutionContext", reflect.TypeOf((*MockVM)(nil).ExecutionContext), currentTime, parent)
}
// Genesis mocks base method.
func (m *MockVM) Genesis() *Genesis {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Genesis")
ret0, _ := ret[0].(*Genesis)
return ret0
}
// Genesis indicates an expected call of Genesis.
func (mr *MockVMMockRecorder) Genesis() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Genesis", reflect.TypeOf((*MockVM)(nil).Genesis))
}
// GetStatelessBlock mocks base method.
func (m *MockVM) GetStatelessBlock(arg0 ids.ID) (*StatelessBlock, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetStatelessBlock", arg0)
ret0, _ := ret[0].(*StatelessBlock)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetStatelessBlock indicates an expected call of GetStatelessBlock.
func (mr *MockVMMockRecorder) GetStatelessBlock(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStatelessBlock", reflect.TypeOf((*MockVM)(nil).GetStatelessBlock), arg0)
}
// IsBootstrapped mocks base method.
func (m *MockVM) IsBootstrapped() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsBootstrapped")
ret0, _ := ret[0].(bool)
return ret0
}
// IsBootstrapped indicates an expected call of IsBootstrapped.
func (mr *MockVMMockRecorder) IsBootstrapped() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsBootstrapped", reflect.TypeOf((*MockVM)(nil).IsBootstrapped))
}
// Mempool mocks base method.
func (m *MockVM) Mempool() Mempool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Mempool")
ret0, _ := ret[0].(Mempool)
return ret0
}
// Mempool indicates an expected call of Mempool.
func (mr *MockVMMockRecorder) Mempool() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Mempool", reflect.TypeOf((*MockVM)(nil).Mempool))
}
// Rejected mocks base method.
func (m *MockVM) Rejected(arg0 *StatelessBlock) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Rejected", arg0)
}
// Rejected indicates an expected call of Rejected.
func (mr *MockVMMockRecorder) Rejected(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rejected", reflect.TypeOf((*MockVM)(nil).Rejected), arg0)
}
// State mocks base method.
func (m *MockVM) State() database.Database {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "State")
ret0, _ := ret[0].(database.Database)
return ret0
}
// State indicates an expected call of State.
func (mr *MockVMMockRecorder) State() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "State", reflect.TypeOf((*MockVM)(nil).State))
}
// Verified mocks base method.
func (m *MockVM) Verified(arg0 *StatelessBlock) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Verified", arg0)
}
// Verified indicates an expected call of Verified.
func (mr *MockVMMockRecorder) Verified(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verified", reflect.TypeOf((*MockVM)(nil).Verified), arg0)
}