graphql: fee history fields (#24452)

This PR adds the `NextBaseFeePerGas` to `Block` and `EffectiveTip` to `Transaction` to make it easier for clients to compute fee history themselves via graphql queries.
This commit is contained in:
Sina Mahmoodi
2022-03-10 13:59:22 +01:00
committed by GitHub
parent 538a868384
commit 57cec89253
3 changed files with 61 additions and 12 deletions

View File

@ -117,7 +117,7 @@ func (oracle *Oracle) processBlock(bf *blockFees, percentiles []float64) {
reward, _ := tx.EffectiveGasTip(bf.block.BaseFee())
sorter[i] = txGasAndReward{gasUsed: bf.receipts[i].GasUsed, reward: reward}
}
sort.Sort(sorter)
sort.Stable(sorter)
var txIndex int
sumGasUsed := sorter[0].gasUsed