From 37b952a4a20a6df8f0eb44dad2acf0d630bba894 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 27 Jul 2023 01:32:15 -0700 Subject: [PATCH] core/types: deepcopy ExcessDataGas, DataGasUsed (#27767) --- core/types/block.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/types/block.go b/core/types/block.go index e1f1feb7a..b8478e5a1 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -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 }