Skip to content

Commit

Permalink
core/types: initialize ChainID in SetCodeTx copy method (#31054)
Browse files Browse the repository at this point in the history
  • Loading branch information
islishude authored Jan 20, 2025
1 parent 448e16a commit 530adfc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/types/tx_setcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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)
}
Expand Down

0 comments on commit 530adfc

Please sign in to comment.