aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorzsfelfoldi <zsfelfoldi@gmail.com>2015-05-26 20:39:13 +0800
committerzsfelfoldi <zsfelfoldi@gmail.com>2015-06-15 21:55:38 +0800
commit2e8016c80d450a7d1126b481f1262b7cd9dec24d (patch)
treee300e35b8b8f8c14882be8911e74387975728c2a /eth
parent0930e190a7eec8f956e22ada638e5b97f7ba9cda (diff)
downloaddexon-2e8016c80d450a7d1126b481f1262b7cd9dec24d.tar.gz
dexon-2e8016c80d450a7d1126b481f1262b7cd9dec24d.tar.zst
dexon-2e8016c80d450a7d1126b481f1262b7cd9dec24d.zip
fixed initial base price bug
Diffstat (limited to 'eth')
-rw-r--r--eth/gasprice.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/eth/gasprice.go b/eth/gasprice.go
index f5b241e2c..6f46559a2 100644
--- a/eth/gasprice.go
+++ b/eth/gasprice.go
@@ -159,6 +159,10 @@ func (self *GasPriceOracle) SuggestPrice() *big.Int {
base := self.lastBase
self.lastBaseMutex.Unlock()
+ if base == nil {
+ base = self.eth.GpoMinGasPrice
+ }
+
baseCorr := new(big.Int).Mul(base, big.NewInt(int64(100+self.eth.GpobaseCorrectionFactor)))
baseCorr.Div(baseCorr, big.NewInt(100))