diff options
author | zsfelfoldi <zsfelfoldi@gmail.com> | 2015-05-26 21:15:54 +0800 |
---|---|---|
committer | zsfelfoldi <zsfelfoldi@gmail.com> | 2015-06-15 21:55:38 +0800 |
commit | 6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d (patch) | |
tree | 0c225d4f5f3b7b239f86844b9f131396b3d8c02d /eth | |
parent | 2e8016c80d450a7d1126b481f1262b7cd9dec24d (diff) | |
download | dexon-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.tar.gz dexon-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.tar.zst dexon-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.zip |
fallback for uninitialized GPO config values
Diffstat (limited to 'eth')
-rw-r--r-- | eth/gasprice.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/eth/gasprice.go b/eth/gasprice.go index 6f46559a2..12e76fc2c 100644 --- a/eth/gasprice.go +++ b/eth/gasprice.go @@ -162,6 +162,9 @@ func (self *GasPriceOracle) SuggestPrice() *big.Int { if base == nil { base = self.eth.GpoMinGasPrice } + if base == nil { + return big.NewInt(10000000000000) // apparently MinGasPrice is not initialized during some tests + } baseCorr := new(big.Int).Mul(base, big.NewInt(int64(100+self.eth.GpobaseCorrectionFactor))) baseCorr.Div(baseCorr, big.NewInt(100)) |