From a650a400a068d901af6eba1aad0199a465550a8d Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Tue, 25 Feb 2025 13:05:59 +0100 Subject: [PATCH] core/types: use fields directly --- core/types/transaction_signing.go | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/core/types/transaction_signing.go b/core/types/transaction_signing.go index 030fc472a0..3380bcc2c0 100644 --- a/core/types/transaction_signing.go +++ b/core/types/transaction_signing.go @@ -366,21 +366,22 @@ func (s londonSigner) SignatureValues(tx *Transaction, sig []byte) (R, S, V *big // Hash returns the hash to be signed by the sender. // It does not uniquely identify the transaction. func (s londonSigner) Hash(tx *Transaction) common.Hash { - if tx.Type() != DynamicFeeTxType { + inner, ok := tx.inner.(*DynamicFeeTx) + if !ok { return s.eip2930Signer.Hash(tx) } return prefixedRlpHash( - tx.Type(), + inner.txType(), []interface{}{ s.chainId, - tx.Nonce(), - tx.GasTipCap(), - tx.GasFeeCap(), - tx.Gas(), - tx.To(), - tx.Value(), - tx.Data(), - tx.AccessList(), + inner.nonce(), + inner.gasTipCap(), + inner.gasFeeCap(), + inner.gas(), + inner.to(), + inner.value(), + inner.data(), + inner.accessList(), }) }