Skip to content

Commit

Permalink
Revert "eth: refactor creation of EthAPIBackend (ethereum#20476)" (et…
Browse files Browse the repository at this point in the history
…hereum#20536)

This reverts commit a1bc0e3.
  • Loading branch information
karalabe authored and enriquefynn committed Feb 15, 2021
1 parent 0aa5bfc commit 0d87a2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
eth.miner = miner.New(eth, &config.Miner, chainConfig, eth.EventMux(), eth.engine, eth.isLocalBlock)
eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData))

eth.APIBackend = &EthAPIBackend{ctx.ExtRPCEnabled(), eth, nil}
gpoParams := config.GPO
if gpoParams.Default == nil {
gpoParams.Default = config.Miner.GasPrice
}

eth.APIBackend = &EthAPIBackend{ctx.ExtRPCEnabled(), eth, gasprice.NewOracle(eth.APIBackend, gpoParams)}
eth.APIBackend.gpo = gasprice.NewOracle(eth.APIBackend, gpoParams)

return eth, nil
}
Expand Down

0 comments on commit 0d87a2f

Please sign in to comment.