From e9e3a66986669a829a4ec43ae73f64f1ffc678eb Mon Sep 17 00:00:00 2001 From: islishude Date: Thu, 16 Jan 2025 08:30:57 +0800 Subject: [PATCH] Revert "core/types: update chain ID check to handle nil values" This reverts commit ef342c4c59b0a3f04dc27e03a7b3e60bb940740a. --- core/types/transaction_signing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types/transaction_signing.go b/core/types/transaction_signing.go index d5f3b8b1a9..4d70f37bd3 100644 --- a/core/types/transaction_signing.go +++ b/core/types/transaction_signing.go @@ -287,7 +287,7 @@ func (s cancunSigner) SignatureValues(tx *Transaction, sig []byte) (R, S, V *big } // Check that chain ID of tx matches the signer. We also accept ID zero here, // because it indicates that the chain ID was not specified in the tx. - if txdata.ChainID != nil && txdata.ChainID.CmpBig(s.chainId) != 0 { + if txdata.ChainID.Sign() != 0 && txdata.ChainID.ToBig().Cmp(s.chainId) != 0 { return nil, nil, nil, fmt.Errorf("%w: have %d want %d", ErrInvalidChainId, txdata.ChainID, s.chainId) } R, S, _ = decodeSignature(sig)