mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
eth/gasprice: use Sign() to compare with zero, close XFN-93 (#1655)
This commit is contained in:
parent
d8af7fa0d4
commit
17cd604541
1 changed files with 3 additions and 3 deletions
|
|
@ -92,15 +92,15 @@ func NewOracle(backend OracleBackend, params Config, startPrice *big.Int) *Oracl
|
||||||
log.Warn("Sanitizing invalid gasprice oracle sample percentile", "provided", params.Percentile, "updated", percent)
|
log.Warn("Sanitizing invalid gasprice oracle sample percentile", "provided", params.Percentile, "updated", percent)
|
||||||
}
|
}
|
||||||
maxPrice := params.MaxPrice
|
maxPrice := params.MaxPrice
|
||||||
if maxPrice == nil || maxPrice.Int64() <= 0 {
|
if maxPrice == nil || maxPrice.Sign() <= 0 {
|
||||||
maxPrice = DefaultMaxPrice
|
maxPrice = DefaultMaxPrice
|
||||||
log.Warn("Sanitizing invalid gasprice oracle price cap", "provided", params.MaxPrice, "updated", maxPrice)
|
log.Warn("Sanitizing invalid gasprice oracle price cap", "provided", params.MaxPrice, "updated", maxPrice)
|
||||||
}
|
}
|
||||||
ignorePrice := params.IgnorePrice
|
ignorePrice := params.IgnorePrice
|
||||||
if ignorePrice == nil || ignorePrice.Int64() <= 0 {
|
if ignorePrice == nil || ignorePrice.Sign() <= 0 {
|
||||||
ignorePrice = DefaultIgnorePrice
|
ignorePrice = DefaultIgnorePrice
|
||||||
log.Warn("Sanitizing invalid gasprice oracle ignore price", "provided", params.IgnorePrice, "updated", ignorePrice)
|
log.Warn("Sanitizing invalid gasprice oracle ignore price", "provided", params.IgnorePrice, "updated", ignorePrice)
|
||||||
} else if ignorePrice.Int64() > 0 {
|
} else if ignorePrice.Sign() > 0 {
|
||||||
log.Info("Gasprice oracle is ignoring threshold set", "threshold", ignorePrice)
|
log.Info("Gasprice oracle is ignoring threshold set", "threshold", ignorePrice)
|
||||||
}
|
}
|
||||||
maxHeaderHistory := params.MaxHeaderHistory
|
maxHeaderHistory := params.MaxHeaderHistory
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue