core/types: reduce allocations

This commit is contained in:
Marius van der Wijden 2025-04-10 12:45:13 +02:00
parent d2176f463b
commit f8125260de

View file

@ -365,9 +365,9 @@ func (tx *Transaction) EffectiveGasTip(baseFee *big.Int) (*big.Int, error) {
}
gasFeeCap = gasFeeCap.Sub(gasFeeCap, baseFee)
gasTipCap := tx.GasTipCap()
gasTipCap := tx.inner.gasTipCap()
if gasTipCap.Cmp(gasFeeCap) < 0 {
return gasTipCap, err
return gasFeeCap.Set(gasTipCap), err
}
return gasFeeCap, err
}