|
|
|
@ -5,7 +5,6 @@
|
|
|
|
|
package common
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
context "context"
|
|
|
|
|
accounts "github.com/ethereum/go-ethereum/accounts"
|
|
|
|
|
keystore "github.com/ethereum/go-ethereum/accounts/keystore"
|
|
|
|
|
common "github.com/ethereum/go-ethereum/common"
|
|
|
|
@ -399,229 +398,6 @@ func (mr *MockAccountManagerMockRecorder) AddressToDecryptedAccount(address, pas
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddressToDecryptedAccount", reflect.TypeOf((*MockAccountManager)(nil).AddressToDecryptedAccount), address, password)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MockTxQueue is a mock of TxQueue interface
|
|
|
|
|
type MockTxQueue struct {
|
|
|
|
|
ctrl *gomock.Controller
|
|
|
|
|
recorder *MockTxQueueMockRecorder
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MockTxQueueMockRecorder is the mock recorder for MockTxQueue
|
|
|
|
|
type MockTxQueueMockRecorder struct {
|
|
|
|
|
mock *MockTxQueue
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewMockTxQueue creates a new mock instance
|
|
|
|
|
func NewMockTxQueue(ctrl *gomock.Controller) *MockTxQueue {
|
|
|
|
|
mock := &MockTxQueue{ctrl: ctrl}
|
|
|
|
|
mock.recorder = &MockTxQueueMockRecorder{mock}
|
|
|
|
|
return mock
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
|
|
|
func (m *MockTxQueue) EXPECT() *MockTxQueueMockRecorder {
|
|
|
|
|
return m.recorder
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Remove mocks base method
|
|
|
|
|
func (m *MockTxQueue) Remove(id QueuedTxID) {
|
|
|
|
|
m.ctrl.Call(m, "Remove", id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Remove indicates an expected call of Remove
|
|
|
|
|
func (mr *MockTxQueueMockRecorder) Remove(id interface{}) *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockTxQueue)(nil).Remove), id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reset mocks base method
|
|
|
|
|
func (m *MockTxQueue) Reset() {
|
|
|
|
|
m.ctrl.Call(m, "Reset")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reset indicates an expected call of Reset
|
|
|
|
|
func (mr *MockTxQueueMockRecorder) Reset() *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockTxQueue)(nil).Reset))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Count mocks base method
|
|
|
|
|
func (m *MockTxQueue) Count() int {
|
|
|
|
|
ret := m.ctrl.Call(m, "Count")
|
|
|
|
|
ret0, _ := ret[0].(int)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Count indicates an expected call of Count
|
|
|
|
|
func (mr *MockTxQueueMockRecorder) Count() *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Count", reflect.TypeOf((*MockTxQueue)(nil).Count))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Has mocks base method
|
|
|
|
|
func (m *MockTxQueue) Has(id QueuedTxID) bool {
|
|
|
|
|
ret := m.ctrl.Call(m, "Has", id)
|
|
|
|
|
ret0, _ := ret[0].(bool)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Has indicates an expected call of Has
|
|
|
|
|
func (mr *MockTxQueueMockRecorder) Has(id interface{}) *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockTxQueue)(nil).Has), id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MockTxQueueManager is a mock of TxQueueManager interface
|
|
|
|
|
type MockTxQueueManager struct {
|
|
|
|
|
ctrl *gomock.Controller
|
|
|
|
|
recorder *MockTxQueueManagerMockRecorder
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MockTxQueueManagerMockRecorder is the mock recorder for MockTxQueueManager
|
|
|
|
|
type MockTxQueueManagerMockRecorder struct {
|
|
|
|
|
mock *MockTxQueueManager
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NewMockTxQueueManager creates a new mock instance
|
|
|
|
|
func NewMockTxQueueManager(ctrl *gomock.Controller) *MockTxQueueManager {
|
|
|
|
|
mock := &MockTxQueueManager{ctrl: ctrl}
|
|
|
|
|
mock.recorder = &MockTxQueueManagerMockRecorder{mock}
|
|
|
|
|
return mock
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use
|
|
|
|
|
func (m *MockTxQueueManager) EXPECT() *MockTxQueueManagerMockRecorder {
|
|
|
|
|
return m.recorder
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Start mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) Start() {
|
|
|
|
|
m.ctrl.Call(m, "Start")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Start indicates an expected call of Start
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) Start() *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockTxQueueManager)(nil).Start))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Stop mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) Stop() {
|
|
|
|
|
m.ctrl.Call(m, "Stop")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Stop indicates an expected call of Stop
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) Stop() *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTxQueueManager)(nil).Stop))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TransactionQueue mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) TransactionQueue() TxQueue {
|
|
|
|
|
ret := m.ctrl.Call(m, "TransactionQueue")
|
|
|
|
|
ret0, _ := ret[0].(TxQueue)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TransactionQueue indicates an expected call of TransactionQueue
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) TransactionQueue() *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionQueue", reflect.TypeOf((*MockTxQueueManager)(nil).TransactionQueue))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueueTransaction mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) QueueTransaction(tx *QueuedTx) error {
|
|
|
|
|
ret := m.ctrl.Call(m, "QueueTransaction", tx)
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueueTransaction indicates an expected call of QueueTransaction
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) QueueTransaction(tx interface{}) *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueueTransaction", reflect.TypeOf((*MockTxQueueManager)(nil).QueueTransaction), tx)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WaitForTransaction mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) WaitForTransaction(tx *QueuedTx) error {
|
|
|
|
|
ret := m.ctrl.Call(m, "WaitForTransaction", tx)
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// WaitForTransaction indicates an expected call of WaitForTransaction
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) WaitForTransaction(tx interface{}) *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForTransaction", reflect.TypeOf((*MockTxQueueManager)(nil).WaitForTransaction), tx)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SendTransactionRPCHandler mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) SendTransactionRPCHandler(ctx context.Context, args ...interface{}) (interface{}, error) {
|
|
|
|
|
varargs := []interface{}{ctx}
|
|
|
|
|
for _, a := range args {
|
|
|
|
|
varargs = append(varargs, a)
|
|
|
|
|
}
|
|
|
|
|
ret := m.ctrl.Call(m, "SendTransactionRPCHandler", varargs...)
|
|
|
|
|
ret0, _ := ret[0].(interface{})
|
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
|
return ret0, ret1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// SendTransactionRPCHandler indicates an expected call of SendTransactionRPCHandler
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) SendTransactionRPCHandler(ctx interface{}, args ...interface{}) *gomock.Call {
|
|
|
|
|
varargs := append([]interface{}{ctx}, args...)
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendTransactionRPCHandler", reflect.TypeOf((*MockTxQueueManager)(nil).SendTransactionRPCHandler), varargs...)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CompleteTransaction mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) CompleteTransaction(id QueuedTxID, password string) (common.Hash, error) {
|
|
|
|
|
ret := m.ctrl.Call(m, "CompleteTransaction", id, password)
|
|
|
|
|
ret0, _ := ret[0].(common.Hash)
|
|
|
|
|
ret1, _ := ret[1].(error)
|
|
|
|
|
return ret0, ret1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CompleteTransaction indicates an expected call of CompleteTransaction
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) CompleteTransaction(id, password interface{}) *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteTransaction", reflect.TypeOf((*MockTxQueueManager)(nil).CompleteTransaction), id, password)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CompleteTransactions mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) CompleteTransactions(ids []QueuedTxID, password string) map[QueuedTxID]RawCompleteTransactionResult {
|
|
|
|
|
ret := m.ctrl.Call(m, "CompleteTransactions", ids, password)
|
|
|
|
|
ret0, _ := ret[0].(map[QueuedTxID]RawCompleteTransactionResult)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CompleteTransactions indicates an expected call of CompleteTransactions
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) CompleteTransactions(ids, password interface{}) *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompleteTransactions", reflect.TypeOf((*MockTxQueueManager)(nil).CompleteTransactions), ids, password)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DiscardTransaction mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) DiscardTransaction(id QueuedTxID) error {
|
|
|
|
|
ret := m.ctrl.Call(m, "DiscardTransaction", id)
|
|
|
|
|
ret0, _ := ret[0].(error)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DiscardTransaction indicates an expected call of DiscardTransaction
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) DiscardTransaction(id interface{}) *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscardTransaction", reflect.TypeOf((*MockTxQueueManager)(nil).DiscardTransaction), id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DiscardTransactions mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) DiscardTransactions(ids []QueuedTxID) map[QueuedTxID]RawDiscardTransactionResult {
|
|
|
|
|
ret := m.ctrl.Call(m, "DiscardTransactions", ids)
|
|
|
|
|
ret0, _ := ret[0].(map[QueuedTxID]RawDiscardTransactionResult)
|
|
|
|
|
return ret0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DiscardTransactions indicates an expected call of DiscardTransactions
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) DiscardTransactions(ids interface{}) *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DiscardTransactions", reflect.TypeOf((*MockTxQueueManager)(nil).DiscardTransactions), ids)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DisableNotificactions mocks base method
|
|
|
|
|
func (m *MockTxQueueManager) DisableNotificactions() {
|
|
|
|
|
m.ctrl.Call(m, "DisableNotificactions")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DisableNotificactions indicates an expected call of DisableNotificactions
|
|
|
|
|
func (mr *MockTxQueueManagerMockRecorder) DisableNotificactions() *gomock.Call {
|
|
|
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisableNotificactions", reflect.TypeOf((*MockTxQueueManager)(nil).DisableNotificactions))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MockJailCell is a mock of JailCell interface
|
|
|
|
|
type MockJailCell struct {
|
|
|
|
|
ctrl *gomock.Controller
|
|
|
|
|