Skip to content

Commit 59b06e4

Browse files
committed
eth/gasprice: reduce default gas price for empty block
1 parent de7203a commit 59b06e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eth/gasprice/gasprice.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ func (oracle *Oracle) SuggestTipCap(ctx context.Context) (*big.Int, error) {
193193
// Nothing returned. There are two special cases here:
194194
// - The block is empty
195195
// - All the transactions included are sent by the miner itself.
196-
// In these cases, use the latest calculated price for samping.
196+
// In these cases, use half of the latest calculated price for samping.
197197
if len(res.values) == 0 {
198-
res.values = []*big.Int{lastPrice}
198+
res.values = []*big.Int{new(big.Int).Div(lastPrice, common.Big2)}
199199
}
200200
// Besides, in order to collect enough data for sampling, if nothing
201201
// meaningful returned, try to query more blocks. But the maximum

0 commit comments

Comments
 (0)