Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions eth/gasprice/feehistory.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ func (oracle *Oracle) processBlock(bf *blockFees, percentiles []float64) {
}
sorter := make(sortGasAndReward, len(bf.block.Transactions()))
for i, tx := range bf.block.Transactions() {
reward := big.NewInt(0)
reward, _ = tx.EffectiveGasTip(bf.block.BaseFee())
reward, _ := tx.EffectiveGasTip(bf.block.BaseFee())
sorter[i] = txGasAndReward{gasUsed: bf.receipts[i].GasUsed, reward: reward}
}
sort.Sort(sorter)
Expand Down
2 changes: 0 additions & 2 deletions graphql/graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ func (t *Transaction) GasPrice(ctx context.Context) (hexutil.Big, error) {
case types.AltFeeTxType:
if t.block != nil {
if baseFee, _ := t.block.BaseFeePerGas(ctx); baseFee != nil {
// TODO base fee of erc20 fee
// price = min(tip, gasFeeCap - baseFee) + baseFee
return (hexutil.Big)(*math.BigMin(new(big.Int).Add(tx.GasTipCap(), baseFee.ToInt()), tx.GasFeeCap())), nil
}
}
Expand Down