mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
eth/gasprice: reduce default gas price for empty block
This commit is contained in:
parent
de7203ac88
commit
59b06e4a03
1 changed files with 2 additions and 2 deletions
|
|
@ -193,9 +193,9 @@ func (oracle *Oracle) SuggestTipCap(ctx context.Context) (*big.Int, error) {
|
|||
// Nothing returned. There are two special cases here:
|
||||
// - The block is empty
|
||||
// - All the transactions included are sent by the miner itself.
|
||||
// In these cases, use the latest calculated price for samping.
|
||||
// In these cases, use half of the latest calculated price for samping.
|
||||
if len(res.values) == 0 {
|
||||
res.values = []*big.Int{lastPrice}
|
||||
res.values = []*big.Int{new(big.Int).Div(lastPrice, common.Big2)}
|
||||
}
|
||||
// Besides, in order to collect enough data for sampling, if nothing
|
||||
// meaningful returned, try to query more blocks. But the maximum
|
||||
|
|
|
|||
Loading…
Reference in a new issue