mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-11 07:24:27 +00:00
update minGasPrice in SuggestPrice
This commit is contained in:
parent
c3117a6f41
commit
0bb2ba1116
1 changed files with 3 additions and 3 deletions
|
|
@ -30,7 +30,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var maxPrice = big.NewInt(500 * params.Shannon)
|
var maxPrice = big.NewInt(500 * params.Shannon)
|
||||||
var minPrice = big.NewInt(common.MinGasPrice)
|
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Blocks int
|
Blocks int
|
||||||
|
|
@ -142,8 +141,9 @@ func (gpo *Oracle) SuggestPrice(ctx context.Context) (*big.Int, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check gas price min.
|
// Check gas price min.
|
||||||
if price.Cmp(minPrice) < 0 {
|
minGasPrice := big.NewInt(common.MinGasPrice)
|
||||||
price = new(big.Int).Set(minPrice)
|
if price.Cmp(minGasPrice) < 0 {
|
||||||
|
price = new(big.Int).Set(minGasPrice)
|
||||||
}
|
}
|
||||||
|
|
||||||
gpo.cacheLock.Lock()
|
gpo.cacheLock.Lock()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue