core/types: initialize ChainID in SetCodeTx copy method (#31054)

This commit is contained in:
Shude Li 2025-01-21 00:06:39 +08:00 committed by GitHub
parent 448e16ad54
commit 530adfc8e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -148,7 +148,7 @@ func (tx *SetCodeTx) copy() TxData {
AccessList: make(AccessList, len(tx.AccessList)),
AuthList: make([]SetCodeAuthorization, len(tx.AuthList)),
Value: new(uint256.Int),
ChainID: tx.ChainID,
ChainID: new(uint256.Int),
GasTipCap: new(uint256.Int),
GasFeeCap: new(uint256.Int),
V: new(uint256.Int),
@ -160,6 +160,9 @@ func (tx *SetCodeTx) copy() TxData {
if tx.Value != nil {
cpy.Value.Set(tx.Value)
}
if tx.ChainID != nil {
cpy.ChainID.Set(tx.ChainID)
}
if tx.GasTipCap != nil {
cpy.GasTipCap.Set(tx.GasTipCap)
}