mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-09 04:21:20 +00:00
d848233275
# Conflicts: # cmd/geth/consolecmd.go # cmd/rpcdaemon/service/service.go # cmd/utils/flags.go # eth/backend.go
28 lines
771 B
Go
28 lines
771 B
Go
package service
|
|
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/cmd/rpcdaemon/commands"
|
|
"github.com/ledgerwatch/turbo-geth/core"
|
|
"github.com/ledgerwatch/turbo-geth/eth"
|
|
"github.com/ledgerwatch/turbo-geth/ethdb"
|
|
"github.com/ledgerwatch/turbo-geth/node"
|
|
"github.com/ledgerwatch/turbo-geth/rpc"
|
|
)
|
|
|
|
// RPCDaemonService is used in js console and console tests
|
|
type RPCDaemonService struct {
|
|
api []rpc.API
|
|
db *ethdb.ObjectDatabase
|
|
ethBackend *eth.Ethereum
|
|
}
|
|
|
|
|
|
func New(db *ethdb.ObjectDatabase, ethBackend *eth.Ethereum, stack *node.Node) *RPCDaemonService {
|
|
service := &RPCDaemonService{[]rpc.API{}, db, ethBackend}
|
|
apis := commands.GetAPI(db.KV(), core.NewEthBackend(ethBackend), []string{"eth", "debug"})
|
|
|
|
stack.RegisterAPIs(apis)
|
|
|
|
return service
|
|
}
|