From b211742e5f1ec87e59683e979dd914c1a5a2fade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 9 Jan 2020 13:26:37 +0200 Subject: [PATCH] Revert "eth: refactor creation of EthAPIBackend (#20476)" (#20536) This reverts commit a1bc0e3cb69d6080b884728a60d2f92392b4c392. --- eth/backend.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 047583f5c..adde609de 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -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 }