/
txpool_mock.go
204 lines (173 loc) · 6.68 KB
/
txpool_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
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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/klaytn/klaytn/work (interfaces: TxPool)
// Package mocks is a generated GoMock package.
package mocks
import (
big "math/big"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
blockchain "github.com/klaytn/klaytn/blockchain"
types "github.com/klaytn/klaytn/blockchain/types"
common "github.com/klaytn/klaytn/common"
event "github.com/klaytn/klaytn/event"
)
// MockTxPool is a mock of TxPool interface
type MockTxPool struct {
ctrl *gomock.Controller
recorder *MockTxPoolMockRecorder
}
// MockTxPoolMockRecorder is the mock recorder for MockTxPool
type MockTxPoolMockRecorder struct {
mock *MockTxPool
}
// NewMockTxPool creates a new mock instance
func NewMockTxPool(ctrl *gomock.Controller) *MockTxPool {
mock := &MockTxPool{ctrl: ctrl}
mock.recorder = &MockTxPoolMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockTxPool) EXPECT() *MockTxPoolMockRecorder {
return m.recorder
}
// AddLocal mocks base method
func (m *MockTxPool) AddLocal(arg0 *types.Transaction) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddLocal", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// AddLocal indicates an expected call of AddLocal
func (mr *MockTxPoolMockRecorder) AddLocal(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddLocal", reflect.TypeOf((*MockTxPool)(nil).AddLocal), arg0)
}
// CachedPendingTxsByCount mocks base method
func (m *MockTxPool) CachedPendingTxsByCount(arg0 int) types.Transactions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CachedPendingTxsByCount", arg0)
ret0, _ := ret[0].(types.Transactions)
return ret0
}
// CachedPendingTxsByCount indicates an expected call of CachedPendingTxsByCount
func (mr *MockTxPoolMockRecorder) CachedPendingTxsByCount(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CachedPendingTxsByCount", reflect.TypeOf((*MockTxPool)(nil).CachedPendingTxsByCount), arg0)
}
// Content mocks base method
func (m *MockTxPool) Content() (map[common.Address]types.Transactions, map[common.Address]types.Transactions) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Content")
ret0, _ := ret[0].(map[common.Address]types.Transactions)
ret1, _ := ret[1].(map[common.Address]types.Transactions)
return ret0, ret1
}
// Content indicates an expected call of Content
func (mr *MockTxPoolMockRecorder) Content() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Content", reflect.TypeOf((*MockTxPool)(nil).Content))
}
// GasPrice mocks base method
func (m *MockTxPool) GasPrice() *big.Int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GasPrice")
ret0, _ := ret[0].(*big.Int)
return ret0
}
// GasPrice indicates an expected call of GasPrice
func (mr *MockTxPoolMockRecorder) GasPrice() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GasPrice", reflect.TypeOf((*MockTxPool)(nil).GasPrice))
}
// Get mocks base method
func (m *MockTxPool) Get(arg0 common.Hash) *types.Transaction {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0)
ret0, _ := ret[0].(*types.Transaction)
return ret0
}
// Get indicates an expected call of Get
func (mr *MockTxPoolMockRecorder) Get(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTxPool)(nil).Get), arg0)
}
// GetPendingNonce mocks base method
func (m *MockTxPool) GetPendingNonce(arg0 common.Address) uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPendingNonce", arg0)
ret0, _ := ret[0].(uint64)
return ret0
}
// GetPendingNonce indicates an expected call of GetPendingNonce
func (mr *MockTxPoolMockRecorder) GetPendingNonce(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPendingNonce", reflect.TypeOf((*MockTxPool)(nil).GetPendingNonce), arg0)
}
// HandleTxMsg mocks base method
func (m *MockTxPool) HandleTxMsg(arg0 types.Transactions) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "HandleTxMsg", arg0)
}
// HandleTxMsg indicates an expected call of HandleTxMsg
func (mr *MockTxPoolMockRecorder) HandleTxMsg(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleTxMsg", reflect.TypeOf((*MockTxPool)(nil).HandleTxMsg), arg0)
}
// Pending mocks base method
func (m *MockTxPool) Pending() (map[common.Address]types.Transactions, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Pending")
ret0, _ := ret[0].(map[common.Address]types.Transactions)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Pending indicates an expected call of Pending
func (mr *MockTxPoolMockRecorder) Pending() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pending", reflect.TypeOf((*MockTxPool)(nil).Pending))
}
// SetGasPrice mocks base method
func (m *MockTxPool) SetGasPrice(arg0 *big.Int) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetGasPrice", arg0)
}
// SetGasPrice indicates an expected call of SetGasPrice
func (mr *MockTxPoolMockRecorder) SetGasPrice(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetGasPrice", reflect.TypeOf((*MockTxPool)(nil).SetGasPrice), arg0)
}
// Stats mocks base method
func (m *MockTxPool) Stats() (int, int) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Stats")
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(int)
return ret0, ret1
}
// Stats indicates an expected call of Stats
func (mr *MockTxPoolMockRecorder) Stats() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stats", reflect.TypeOf((*MockTxPool)(nil).Stats))
}
// Stop mocks base method
func (m *MockTxPool) Stop() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Stop")
}
// Stop indicates an expected call of Stop
func (mr *MockTxPoolMockRecorder) Stop() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTxPool)(nil).Stop))
}
// SubscribeNewTxsEvent mocks base method
func (m *MockTxPool) SubscribeNewTxsEvent(arg0 chan<- blockchain.NewTxsEvent) event.Subscription {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SubscribeNewTxsEvent", arg0)
ret0, _ := ret[0].(event.Subscription)
return ret0
}
// SubscribeNewTxsEvent indicates an expected call of SubscribeNewTxsEvent
func (mr *MockTxPoolMockRecorder) SubscribeNewTxsEvent(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeNewTxsEvent", reflect.TypeOf((*MockTxPool)(nil).SubscribeNewTxsEvent), arg0)
}