core/types: deepcopy ExcessDataGas, DataGasUsed (#27767)

This commit is contained in:
Darioush Jalali 2023-07-27 01:32:15 -07:00 committed by devopsbo3
parent 618fcc660d
commit 0c56bf33c0

View file

@ -284,6 +284,14 @@ func CopyHeader(h *Header) *Header {
cpy.WithdrawalsHash = new(common.Hash) cpy.WithdrawalsHash = new(common.Hash)
*cpy.WithdrawalsHash = *h.WithdrawalsHash *cpy.WithdrawalsHash = *h.WithdrawalsHash
} }
if h.ExcessDataGas != nil {
cpy.ExcessDataGas = new(uint64)
*cpy.ExcessDataGas = *h.ExcessDataGas
}
if h.DataGasUsed != nil {
cpy.DataGasUsed = new(uint64)
*cpy.DataGasUsed = *h.DataGasUsed
}
return &cpy return &cpy
} }