cmd, les, eth, eth/gasprice: using new gas price oracle (#13853)
* cmd, les, eth, eth/gasprice: using new gas price oracle * eth/gasprice: renamed source file * eth/gasprice: added security checks for gpo params * eth/gasprice: fixed naming issues * eth/gasprice: max limit, maxEmpty
This commit is contained in:
committed by
Péter Szilágyi
parent
0ec1104ba9
commit
9aca9e6deb
@ -111,7 +111,12 @@ func New(ctx *node.ServiceContext, config *eth.Config) (*LightEthereum, error) {
|
||||
relay.reqDist = eth.protocolManager.reqDist
|
||||
|
||||
eth.ApiBackend = &LesApiBackend{eth, nil}
|
||||
eth.ApiBackend.gpo = gasprice.NewLightPriceOracle(eth.ApiBackend)
|
||||
gpoParams := gasprice.Config{
|
||||
Blocks: config.GpoBlocks,
|
||||
Percentile: config.GpoPercentile,
|
||||
Default: config.GasPrice,
|
||||
}
|
||||
eth.ApiBackend.gpo = gasprice.NewOracle(eth.ApiBackend, gpoParams)
|
||||
return eth, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user