mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-17 21:46:36 +00:00
fallback for uninitialized GPO config values
This commit is contained in:
parent
2e8016c80d
commit
6e212bdc6d
1 changed files with 3 additions and 0 deletions
|
|
@ -162,6 +162,9 @@ func (self *GasPriceOracle) SuggestPrice() *big.Int {
|
||||||
if base == nil {
|
if base == nil {
|
||||||
base = self.eth.GpoMinGasPrice
|
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 := new(big.Int).Mul(base, big.NewInt(int64(100+self.eth.GpobaseCorrectionFactor)))
|
||||||
baseCorr.Div(baseCorr, big.NewInt(100))
|
baseCorr.Div(baseCorr, big.NewInt(100))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue