diff options
author | Felföldi Zsolt <zsfelfoldi@gmail.com> | 2017-04-06 22:20:42 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-04-06 22:20:42 +0800 |
commit | 9aca9e6deb243b87cc75325be593a3b0c2f0a113 (patch) | |
tree | 605baeff7692446519b40118314a44a2fcb8e923 /les/backend.go | |
parent | 0ec1104ba92c226c279389bbeb88ca515208f030 (diff) | |
download | dexon-9aca9e6deb243b87cc75325be593a3b0c2f0a113.tar dexon-9aca9e6deb243b87cc75325be593a3b0c2f0a113.tar.gz dexon-9aca9e6deb243b87cc75325be593a3b0c2f0a113.tar.bz2 dexon-9aca9e6deb243b87cc75325be593a3b0c2f0a113.tar.lz dexon-9aca9e6deb243b87cc75325be593a3b0c2f0a113.tar.xz dexon-9aca9e6deb243b87cc75325be593a3b0c2f0a113.tar.zst dexon-9aca9e6deb243b87cc75325be593a3b0c2f0a113.zip |
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
Diffstat (limited to 'les/backend.go')
-rw-r--r-- | les/backend.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/les/backend.go b/les/backend.go index bb08efd91..3aad16fa0 100644 --- a/les/backend.go +++ b/les/backend.go @@ -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 } |