From fdb83de6f5aedf2deed71c9a065581b7cff34acc Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Mon, 26 Sep 2022 09:09:30 +0700 Subject: [PATCH] erigon22: authapi to use aggregator22 (#5506) * save * save --- cmd/rpcdaemon/commands/daemon.go | 3 ++- eth/backend.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/rpcdaemon/commands/daemon.go b/cmd/rpcdaemon/commands/daemon.go index 67c160d3a..698b758de 100644 --- a/cmd/rpcdaemon/commands/daemon.go +++ b/cmd/rpcdaemon/commands/daemon.go @@ -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) diff --git a/eth/backend.go b/eth/backend.go index 97e269f7a..678008d94 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -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())