Skip to content

Commit abafcc1

Browse files
jakub-freebitjagdeep sidhu
authored andcommitted
mobile: register filter APIs (ethereum#25642)
This fixes a regression introduced in PR ethereum#25459.
1 parent 01c6d54 commit abafcc1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

mobile/geth.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/ethereum/go-ethereum/core"
2828
"github.com/ethereum/go-ethereum/eth/downloader"
2929
"github.com/ethereum/go-ethereum/eth/ethconfig"
30+
"github.com/ethereum/go-ethereum/eth/filters"
3031
"github.com/ethereum/go-ethereum/ethclient"
3132
"github.com/ethereum/go-ethereum/ethstats"
3233
"github.com/ethereum/go-ethereum/internal/debug"
@@ -35,6 +36,7 @@ import (
3536
"github.com/ethereum/go-ethereum/p2p"
3637
"github.com/ethereum/go-ethereum/p2p/nat"
3738
"github.com/ethereum/go-ethereum/params"
39+
"github.com/ethereum/go-ethereum/rpc"
3840
)
3941

4042
// NodeConfig represents the collection of configuration values to fine tune the Geth
@@ -212,6 +214,14 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
212214
rawStack.Close()
213215
return nil, fmt.Errorf("ethereum init: %v", err)
214216
}
217+
// Register log filter RPC API.
218+
filterSystem := filters.NewFilterSystem(lesBackend.ApiBackend, filters.Config{
219+
LogCacheSize: ethConf.FilterLogCacheSize,
220+
})
221+
rawStack.RegisterAPIs([]rpc.API{{
222+
Namespace: "eth",
223+
Service: filters.NewFilterAPI(filterSystem, true),
224+
}})
215225
// If netstats reporting is requested, do it
216226
if config.EthereumNetStats != "" {
217227
if err := ethstats.New(rawStack, lesBackend.ApiBackend, lesBackend.Engine(), config.EthereumNetStats); err != nil {

0 commit comments

Comments
 (0)