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

This PR makes the gas price oracle ignore transactions priced at `<=1 wei`.
pull/22214/head
Gregory Markou 4 years ago committed by GitHub
parent 0c99868416
commit 256c5d68b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      eth/gasprice/gasprice.go

@ -199,6 +199,9 @@ func (gpo *Oracle) getBlockPrices(ctx context.Context, signer types.Signer, bloc
var prices []*big.Int
for _, tx := range txs {
if tx.GasPriceIntCmp(common.Big1) <= 0 {
continue
}
sender, err := types.Sender(signer, tx)
if err == nil && sender != block.Coinbase() {
prices = append(prices, tx.GasPrice())

Loading…
Cancel
Save