From 26df1d65f0394549c79e068ea148a194c4e3c72f Mon Sep 17 00:00:00 2001 From: 0xLogicalx Date: Sat, 22 Nov 2025 17:37:46 +0100 Subject: [PATCH] Update transaction_signing.go --- core/types/transaction_signing.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/types/transaction_signing.go b/core/types/transaction_signing.go index ef8fb194d5..52c87b49ff 100644 --- a/core/types/transaction_signing.go +++ b/core/types/transaction_signing.go @@ -265,7 +265,7 @@ func (s *modernSigner) Sender(tx *Transaction) (common.Address, error) { // 'modern' txs are defined to use 0 and 1 as their recovery // id, add 27 to become equivalent to unprotected Homestead signatures. V, R, S := tx.RawSignatureValues() - V = new(big.Int).Add(V, big.NewInt(27)) + V = new(big.Int).Add(V, big27) return recoverPlain(s.Hash(tx), R, S, V, true) } @@ -349,10 +349,10 @@ func (s EIP155Signer) Equal(s2 Signer) bool { return ok && eip155.chainId.Cmp(s.chainId) == 0 } -var big8 = big.NewInt(8) - -func (s EIP155Signer) Sender(tx *Transaction) (common.Address, error) { - if tx.Type() != LegacyTxType { +var ( + big27 = big.NewInt(27) + big8 = big.NewInt(8) +) return common.Address{}, ErrTxTypeNotSupported } if !tx.Protected() {