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

This commit is contained in:
Darioush Jalali
2023-07-27 11:32:15 +03:00
committed by GitHub
parent 2274a03e33
commit 37b952a4a2
+8
View File
@@ -284,6 +284,14 @@ func CopyHeader(h *Header) *Header {
cpy.WithdrawalsHash = new(common.Hash)
*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
}