aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2019-06-12 16:24:24 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-06-20 14:40:26 +0800
commite3ec77f50e7e11c7f38bc87b1981afe9df240a2a (patch)
treedc838ad2a2df25cff20e00ee699e229d4d7e0be1 /internal/ethapi
parent2b546660187e8b693b6bbe5ec0fc74bfc008d1d3 (diff)
downloadgo-tangerine-e3ec77f50e7e11c7f38bc87b1981afe9df240a2a.tar
go-tangerine-e3ec77f50e7e11c7f38bc87b1981afe9df240a2a.tar.gz
go-tangerine-e3ec77f50e7e11c7f38bc87b1981afe9df240a2a.tar.bz2
go-tangerine-e3ec77f50e7e11c7f38bc87b1981afe9df240a2a.tar.lz
go-tangerine-e3ec77f50e7e11c7f38bc87b1981afe9df240a2a.tar.xz
go-tangerine-e3ec77f50e7e11c7f38bc87b1981afe9df240a2a.tar.zst
go-tangerine-e3ec77f50e7e11c7f38bc87b1981afe9df240a2a.zip
cmd, graphql, node: graphql flag polishes, les integration
Diffstat (limited to 'internal/ethapi')
-rw-r--r--internal/ethapi/backend.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/internal/ethapi/backend.go b/internal/ethapi/backend.go
index 9229ccfb6..28ec69897 100644
--- a/internal/ethapi/backend.go
+++ b/internal/ethapi/backend.go
@@ -24,6 +24,7 @@ import (
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
+ "github.com/ethereum/go-ethereum/core/bloombits"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
@@ -47,9 +48,10 @@ type Backend interface {
ExtRPCEnabled() bool
RPCGasCap() *big.Int // global gas cap for eth_call over rpc: DoS protection
- // BlockChain API
+ // Blockchain API
SetHead(number uint64)
HeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Header, error)
+ HeaderByHash(ctx context.Context, blockHash common.Hash) (*types.Header, error)
BlockByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*types.Block, error)
StateAndHeaderByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*state.StateDB, *types.Header, error)
GetBlock(ctx context.Context, blockHash common.Hash) (*types.Block, error)
@@ -60,7 +62,7 @@ type Backend interface {
SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription
SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription
- // TxPool API
+ // Transaction pool API
SendTx(ctx context.Context, signedTx *types.Transaction) error
GetTransaction(ctx context.Context, txHash common.Hash) (*types.Transaction, common.Hash, uint64, uint64, error)
GetPoolTransactions() (types.Transactions, error)
@@ -70,6 +72,13 @@ type Backend interface {
TxPoolContent() (map[common.Address]types.Transactions, map[common.Address]types.Transactions)
SubscribeNewTxsEvent(chan<- core.NewTxsEvent) event.Subscription
+ // Filter API
+ BloomStatus() (uint64, uint64)
+ GetLogs(ctx context.Context, blockHash common.Hash) ([][]*types.Log, error)
+ ServiceFilter(ctx context.Context, session *bloombits.MatcherSession)
+ SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription
+ SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription
+
ChainConfig() *params.ChainConfig
CurrentBlock() *types.Block
}