Skip to content

Commit

Permalink
mobile: register filter APIs (ethereum#25642)
Browse files Browse the repository at this point in the history
This fixes a regression introduced in PR ethereum#25459.
  • Loading branch information
jakub-freebit authored and jagdeep sidhu committed Sep 2, 2022
1 parent 01c6d54 commit abafcc1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mobile/geth.go
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/eth/downloader"
"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/ethstats"
"github.com/ethereum/go-ethereum/internal/debug"
Expand All @@ -35,6 +36,7 @@ import (
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/nat"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"
)

// NodeConfig represents the collection of configuration values to fine tune the Geth
Expand Down Expand Up @@ -212,6 +214,14 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
rawStack.Close()
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 config.EthereumNetStats != "" {
if err := ethstats.New(rawStack, lesBackend.ApiBackend, lesBackend.Engine(), config.EthereumNetStats); err != nil {
Expand Down

0 comments on commit abafcc1

Please sign in to comment.