Skip to content

Commit

Permalink
core/types: deepcopy ExcessDataGas, DataGasUsed (ethereum#27767)
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush authored and devopsbo3 committed Nov 10, 2023
1 parent 618fcc6 commit 0c56bf3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 0c56bf3

Please sign in to comment.