use batchElem from rpc client
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"github.com/ethereum/go-ethereum"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/geth/client"
|
||||
)
|
||||
|
||||
type MockEthClient struct {
|
||||
@@ -33,7 +33,7 @@ type MockEthClient struct {
|
||||
filterLogsReturnLogs []types.Log
|
||||
transactionReceipts map[string]*types.Receipt
|
||||
err error
|
||||
passedBatch []rpc.BatchElem
|
||||
passedBatch []client.BatchElem
|
||||
passedMethod string
|
||||
transactionSenderErr error
|
||||
transactionReceiptErr error
|
||||
@@ -122,7 +122,7 @@ func (client *MockEthClient) CallContract(ctx context.Context, msg ethereum.Call
|
||||
return client.callContractReturnBytes, client.callContractErr
|
||||
}
|
||||
|
||||
func (client *MockEthClient) BatchCall(batch []rpc.BatchElem) error {
|
||||
func (client *MockEthClient) BatchCall(batch []client.BatchElem) error {
|
||||
client.passedBatch = batch
|
||||
client.passedMethod = batch[0].Method
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package fakes
|
||||
|
||||
import (
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"github.com/ethereum/go-ethereum/rpc"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/geth/client"
|
||||
)
|
||||
|
||||
type MockRpcClient struct {
|
||||
@@ -19,7 +19,7 @@ type MockRpcClient struct {
|
||||
passedContext context.Context
|
||||
passedMethod string
|
||||
passedResult interface{}
|
||||
passedBatch []rpc.BatchElem
|
||||
passedBatch []client.BatchElem
|
||||
lengthOfBatch int
|
||||
returnPOAHeader core.POAHeader
|
||||
returnPOAHeaders []core.POAHeader
|
||||
@@ -35,7 +35,7 @@ func (client *MockRpcClient) SetIpcPath(ipcPath string) {
|
||||
client.ipcPath = ipcPath
|
||||
}
|
||||
|
||||
func (client *MockRpcClient) BatchCall(batch []rpc.BatchElem) error {
|
||||
func (client *MockRpcClient) BatchCall(batch []client.BatchElem) error {
|
||||
client.passedBatch = batch
|
||||
client.passedMethod = batch[0].Method
|
||||
client.lengthOfBatch = len(batch)
|
||||
|
||||
Reference in New Issue
Block a user