mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
remove emed of rpcdaemon (not ready)
This commit is contained in:
parent
7566e1dbbe
commit
ae652ad5c9
@ -48,14 +48,11 @@ import (
|
||||
"github.com/ledgerwatch/erigon-lib/txpool/txpooluitl"
|
||||
"github.com/ledgerwatch/erigon/cmd/downloader/downloader"
|
||||
"github.com/ledgerwatch/erigon/cmd/downloader/downloadergrpc"
|
||||
"github.com/ledgerwatch/erigon/cmd/rpcdaemon/cli"
|
||||
"github.com/ledgerwatch/erigon/cmd/rpcdaemon/commands"
|
||||
"github.com/ledgerwatch/erigon/cmd/rpcdaemon/interfaces"
|
||||
"github.com/ledgerwatch/erigon/cmd/sentry/sentry"
|
||||
"github.com/ledgerwatch/erigon/common"
|
||||
"github.com/ledgerwatch/erigon/common/debug"
|
||||
"github.com/ledgerwatch/erigon/consensus"
|
||||
"github.com/ledgerwatch/erigon/consensus/bor"
|
||||
"github.com/ledgerwatch/erigon/consensus/clique"
|
||||
"github.com/ledgerwatch/erigon/consensus/ethash"
|
||||
"github.com/ledgerwatch/erigon/consensus/parlia"
|
||||
@ -527,30 +524,32 @@ func New(stack *node.Node, config *ethconfig.Config, txpoolCfg txpool2.Config, l
|
||||
}
|
||||
//eth.APIBackend.gpo = gasprice.NewOracle(eth.APIBackend, gpoParams)
|
||||
|
||||
// start HTTP API
|
||||
httpRpcCfg := cli.Flags{} // TODO: add rpcdaemon cli flags to Erigon and fill this struct (or break it to smaller config objects)
|
||||
ethRpcClient, txPoolRpcClient, miningRpcClient, starkNetRpcClient, stateCache, ff, err := cli.EmbeddedServices(
|
||||
ctx, chainKv, httpRpcCfg.StateCache, blockReader,
|
||||
ethBackendRPC,
|
||||
backend.txPool2GrpcServer,
|
||||
miningRPC,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
/*
|
||||
// start HTTP API
|
||||
httpRpcCfg := cli.Flags{} // TODO: add rpcdaemon cli flags to Erigon and fill this struct (or break it to smaller config objects)
|
||||
ethRpcClient, txPoolRpcClient, miningRpcClient, starkNetRpcClient, stateCache, ff, err := cli.EmbeddedServices(
|
||||
ctx, chainKv, httpRpcCfg.StateCache, blockReader,
|
||||
ethBackendRPC,
|
||||
backend.txPool2GrpcServer,
|
||||
miningRPC,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var borDb kv.RoDB
|
||||
if casted, ok := backend.engine.(*bor.Bor); ok {
|
||||
borDb = casted.DB
|
||||
}
|
||||
apiList := commands.APIList(chainKv, borDb, ethRpcClient, txPoolRpcClient, miningRpcClient, starkNetRpcClient, ff, stateCache, blockReader, httpRpcCfg, nil)
|
||||
go func() {
|
||||
_ = apiList
|
||||
//if err := cli.StartRpcServer(ctx, httpRpcCfg, apiList); err != nil {
|
||||
// log.Error(err.Error())
|
||||
// return
|
||||
//}
|
||||
}()
|
||||
var borDb kv.RoDB
|
||||
if casted, ok := backend.engine.(*bor.Bor); ok {
|
||||
borDb = casted.DB
|
||||
}
|
||||
apiList := commands.APIList(chainKv, borDb, ethRpcClient, txPoolRpcClient, miningRpcClient, starkNetRpcClient, ff, stateCache, blockReader, httpRpcCfg, nil)
|
||||
go func() {
|
||||
_ = apiList
|
||||
//if err := cli.StartRpcServer(ctx, httpRpcCfg, apiList); err != nil {
|
||||
// log.Error(err.Error())
|
||||
// return
|
||||
//}
|
||||
}()
|
||||
*/
|
||||
|
||||
// Register the backend on the node
|
||||
stack.RegisterAPIs(backend.APIs())
|
||||
|
Loading…
Reference in New Issue
Block a user