Skip to content

Commit b211742

Browse files
authored
Revert "eth: refactor creation of EthAPIBackend (#20476)" (#20536)
This reverts commit a1bc0e3.
1 parent 0218d70 commit b211742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eth/backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
213213
eth.miner = miner.New(eth, &config.Miner, chainConfig, eth.EventMux(), eth.engine, eth.isLocalBlock)
214214
eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData))
215215

216+
eth.APIBackend = &EthAPIBackend{ctx.ExtRPCEnabled(), eth, nil}
216217
gpoParams := config.GPO
217218
if gpoParams.Default == nil {
218219
gpoParams.Default = config.Miner.GasPrice
219220
}
220-
221-
eth.APIBackend = &EthAPIBackend{ctx.ExtRPCEnabled(), eth, gasprice.NewOracle(eth.APIBackend, gpoParams)}
221+
eth.APIBackend.gpo = gasprice.NewOracle(eth.APIBackend, gpoParams)
222222

223223
return eth, nil
224224
}

0 commit comments

Comments
 (0)