aboutsummaryrefslogtreecommitdiff
path: root/internal/ethapi
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ethapi')
-rw-r--r--internal/ethapi/api.go4
-rw-r--r--internal/ethapi/backend.go8
2 files changed, 7 insertions, 5 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go
index 767209f..f44b430 100644
--- a/internal/ethapi/api.go
+++ b/internal/ethapi/api.go
@@ -25,7 +25,7 @@ import (
"strings"
"time"
- "github.com/davecgh/go-spew/spew"
+ "github.com/ava-labs/coreth/rpc"
"github.com/ava-labs/go-ethereum/accounts"
"github.com/ava-labs/go-ethereum/accounts/keystore"
"github.com/ava-labs/go-ethereum/accounts/scwallet"
@@ -43,7 +43,7 @@ import (
"github.com/ava-labs/go-ethereum/p2p"
"github.com/ava-labs/go-ethereum/params"
"github.com/ava-labs/go-ethereum/rlp"
- "github.com/ava-labs/go-ethereum/rpc"
+ "github.com/davecgh/go-spew/spew"
"github.com/tyler-smith/go-bip39"
)
diff --git a/internal/ethapi/backend.go b/internal/ethapi/backend.go
index 9ef3ea0..87901b3 100644
--- a/internal/ethapi/backend.go
+++ b/internal/ethapi/backend.go
@@ -21,6 +21,7 @@ import (
"context"
"math/big"
+ myrpc "github.com/ava-labs/coreth/rpc"
"github.com/ava-labs/go-ethereum/accounts"
"github.com/ava-labs/go-ethereum/common"
"github.com/ava-labs/go-ethereum/core"
@@ -50,11 +51,11 @@ type Backend interface {
// Blockchain API
SetHead(number uint64)
- HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
+ HeaderByNumber(ctx context.Context, number myrpc.BlockNumber) (*types.Header, error)
HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
+ BlockByNumber(ctx context.Context, number myrpc.BlockNumber) (*types.Block, error)
BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- StateAndHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*state.StateDB, *types.Header, error)
+ StateAndHeaderByNumber(ctx context.Context, number myrpc.BlockNumber) (*state.StateDB, *types.Header, error)
GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error)
GetTd(hash common.Hash) *big.Int
GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, header *types.Header) (*vm.EVM, func() error, error)
@@ -81,6 +82,7 @@ type Backend interface {
ChainConfig() *params.ChainConfig
CurrentBlock() *types.Block
+ AcceptedBlock() *types.Block
}
func GetAPIs(apiBackend Backend) []rpc.API {