From f8125260dee01d0b813f6e770888b9c4c7b9b8fe Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Thu, 10 Apr 2025 12:45:13 +0200 Subject: [PATCH] core/types: reduce allocations --- core/types/transaction.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/types/transaction.go b/core/types/transaction.go index a2f4104635..16da5f0522 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -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 }