Commit 0e68f6a3 authored by Hamdi Allam's avatar Hamdi Allam

test fix

parent 950bfeb5
......@@ -3,13 +3,14 @@ package node
import (
"math/big"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/rpc"
"github.com/stretchr/testify/mock"
)
var _ EthClient = &MockEthClient{}
type MockEthClient struct {
mock.Mock
}
......@@ -39,17 +40,7 @@ func (m *MockEthClient) StorageHash(address common.Address, blockNumber *big.Int
return args.Get(0).(common.Hash), args.Error(1)
}
func (m *MockEthClient) GethRpcClient() *rpc.Client {
args := m.Called()
return args.Get(0).(*rpc.Client)
}
func (m *MockEthClient) GethEthClient() *ethclient.Client {
args := m.Called()
client, ok := args.Get(0).(*ethclient.Client)
if !ok {
return nil
}
return client
func (m *MockEthClient) FilterLogs(query ethereum.FilterQuery) ([]types.Log, error) {
args := m.Called(query)
return args.Get(0).([]types.Log), args.Error(1)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment