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

This commit is contained in:
Darioush Jalali 2023-07-27 01:32:15 -07:00 committed by GitHub
parent 2274a03e33
commit 37b952a4a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
} }