Skip to content

Commit

Permalink
mobile: rewrote without using cmd/utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-freebit committed Sep 1, 2022
1 parent 56ed6c4 commit 8f6ccfc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mobile/geth.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"fmt"
"path/filepath"

"github.com/ethereum/go-ethereum/cmd/utils"
"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 @@ -36,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 @@ -201,8 +202,14 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) {
rawStack.Close()
return nil, fmt.Errorf("ethereum init: %v", err)
}
// Configure log filter RPC API.
utils.RegisterFilterAPI(rawStack, lesBackend.ApiBackend, &ethConf)
// 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 8f6ccfc

Please sign in to comment.