erigon22: authapi to use aggregator22 (#5506)

* save

* save
This commit is contained in:
Alex Sharov 2022-09-26 09:09:30 +07:00 committed by GitHub
parent f9c2f35c8b
commit fdb83de6f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -116,8 +116,9 @@ func APIList(db kv.RoDB, borDb kv.RoDB, eth rpchelper.ApiBackend, txPool txpool.
func AuthAPIList(db kv.RoDB, eth rpchelper.ApiBackend, txPool txpool.TxpoolClient, mining txpool.MiningClient,
filters *rpchelper.Filters, stateCache kvcache.Cache, blockReader services.FullBlockReader,
agg *libstate.Aggregator22,
cfg httpcfg.HttpCfg) (list []rpc.API) {
base := NewBaseApi(filters, stateCache, blockReader, nil, cfg.WithDatadir, cfg.EvmCallTimeout)
base := NewBaseApi(filters, stateCache, blockReader, agg, cfg.WithDatadir, cfg.EvmCallTimeout)
ethImpl := NewEthAPI(base, db, eth, txPool, mining, cfg.Gascap)
engineImpl := NewEngineAPI(base, db, eth)

View File

@ -588,7 +588,7 @@ func New(stack *node.Node, config *ethconfig.Config, logger log.Logger) (*Ethere
borDb = casted.DB
}
apiList := commands.APIList(chainKv, borDb, ethRpcClient, txPoolRpcClient, miningRpcClient, ff, stateCache, blockReader, backend.agg, httpRpcCfg)
authApiList := commands.AuthAPIList(chainKv, ethRpcClient, txPoolRpcClient, miningRpcClient, ff, stateCache, blockReader, httpRpcCfg)
authApiList := commands.AuthAPIList(chainKv, ethRpcClient, txPoolRpcClient, miningRpcClient, ff, stateCache, blockReader, backend.agg, httpRpcCfg)
go func() {
if err := cli.StartRpcServer(ctx, httpRpcCfg, apiList, authApiList); err != nil {
log.Error(err.Error())