Skip to content

Commit 0905eda

Browse files
btsjoelburget
authored andcommitted
Re-add GPO creation in backend
Clique consensus requires a GPO to function.
1 parent 6f835c3 commit 0905eda

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

eth/backend.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import (
4040
"github.com/ethereum/go-ethereum/crypto"
4141
"github.com/ethereum/go-ethereum/eth/downloader"
4242
"github.com/ethereum/go-ethereum/eth/filters"
43+
"github.com/ethereum/go-ethereum/eth/gasprice"
4344
"github.com/ethereum/go-ethereum/ethdb"
4445
"github.com/ethereum/go-ethereum/event"
4546
"github.com/ethereum/go-ethereum/internal/ethapi"
@@ -180,6 +181,11 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
180181
eth.miner.SetExtra(makeExtraData(config.ExtraData, eth.chainConfig.IsQuorum))
181182

182183
eth.ApiBackend = &EthApiBackend{eth, nil}
184+
gpoParams := config.GPO
185+
if gpoParams.Default == nil {
186+
gpoParams.Default = config.GasPrice
187+
}
188+
eth.ApiBackend.gpo = gasprice.NewOracle(eth.ApiBackend, gpoParams)
183189

184190
return eth, nil
185191
}

0 commit comments

Comments
 (0)