aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorzsfelfoldi <zsfelfoldi@gmail.com>2015-05-26 21:15:54 +0800
committerzsfelfoldi <zsfelfoldi@gmail.com>2015-06-15 21:55:38 +0800
commit6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d (patch)
tree0c225d4f5f3b7b239f86844b9f131396b3d8c02d /eth
parent2e8016c80d450a7d1126b481f1262b7cd9dec24d (diff)
downloadgo-tangerine-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.tar
go-tangerine-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.tar.gz
go-tangerine-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.tar.bz2
go-tangerine-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.tar.lz
go-tangerine-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.tar.xz
go-tangerine-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.tar.zst
go-tangerine-6e212bdc6d1319c84c305c446bbf1ba9ddfdc66d.zip
fallback for uninitialized GPO config values
Diffstat (limited to 'eth')
-rw-r--r--eth/gasprice.go3
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))