eth/gasprice: improve stability of estimated price (#22722)

This commit is contained in:
Daniel Liu 2024-05-20 14:30:51 +08:00
parent 1521b8a663
commit 2b365e8112

View file

@ -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())