mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-14 20:16:36 +00:00
mobile: register filter APIs (#25642)
This fixes a regression introduced in PR #25459.
This commit is contained in:
parent
511bf8f188
commit
d2027accdc
1 changed files with 10 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/ethereum/go-ethereum/core"
|
||||||
"github.com/ethereum/go-ethereum/eth/downloader"
|
"github.com/ethereum/go-ethereum/eth/downloader"
|
||||||
"github.com/ethereum/go-ethereum/eth/ethconfig"
|
"github.com/ethereum/go-ethereum/eth/ethconfig"
|
||||||
|
"github.com/ethereum/go-ethereum/eth/filters"
|
||||||
"github.com/ethereum/go-ethereum/ethclient"
|
"github.com/ethereum/go-ethereum/ethclient"
|
||||||
"github.com/ethereum/go-ethereum/ethstats"
|
"github.com/ethereum/go-ethereum/ethstats"
|
||||||
"github.com/ethereum/go-ethereum/internal/debug"
|
"github.com/ethereum/go-ethereum/internal/debug"
|
||||||
|
|
@ -35,6 +36,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/p2p"
|
"github.com/ethereum/go-ethereum/p2p"
|
||||||
"github.com/ethereum/go-ethereum/p2p/nat"
|
"github.com/ethereum/go-ethereum/p2p/nat"
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/ethereum/go-ethereum/params"
|
||||||
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NodeConfig represents the collection of configuration values to fine tune the Geth
|
// NodeConfig represents the collection of configuration values to fine tune the Geth
|
||||||
|
|
@ -200,6 +202,14 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
|
||||||
rawStack.Close()
|
rawStack.Close()
|
||||||
return nil, fmt.Errorf("ethereum init: %v", err)
|
return nil, fmt.Errorf("ethereum init: %v", err)
|
||||||
}
|
}
|
||||||
|
// Register log filter RPC API.
|
||||||
|
filterSystem := filters.NewFilterSystem(lesBackend.ApiBackend, filters.Config{
|
||||||
|
LogCacheSize: ethConf.FilterLogCacheSize,
|
||||||
|
})
|
||||||
|
rawStack.RegisterAPIs([]rpc.API{{
|
||||||
|
Namespace: "eth",
|
||||||
|
Service: filters.NewFilterAPI(filterSystem, true),
|
||||||
|
}})
|
||||||
// If netstats reporting is requested, do it
|
// If netstats reporting is requested, do it
|
||||||
if config.EthereumNetStats != "" {
|
if config.EthereumNetStats != "" {
|
||||||
if err := ethstats.New(rawStack, lesBackend.ApiBackend, lesBackend.Engine(), config.EthereumNetStats); err != nil {
|
if err := ethstats.New(rawStack, lesBackend.ApiBackend, lesBackend.Engine(), config.EthereumNetStats); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue