From 2b365e8112778ed2b68a80f83450bad7ad6a2339 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Mon, 20 May 2024 14:30:51 +0800 Subject: [PATCH] eth/gasprice: improve stability of estimated price (#22722) --- eth/gasprice/gasprice.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eth/gasprice/gasprice.go b/eth/gasprice/gasprice.go index 8ffd907231..d046437a6c 100644 --- a/eth/gasprice/gasprice.go +++ b/eth/gasprice/gasprice.go @@ -205,6 +205,9 @@ func (gpo *Oracle) getBlockPrices(ctx context.Context, signer types.Signer, bloc var prices []*big.Int for _, tx := range txs { + if tx.GasPrice().Cmp(common.Big1) <= 0 { + continue + } sender, err := types.Sender(signer, tx) if err == nil && sender != block.Coinbase() { prices = append(prices, tx.GasPrice())