-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/types: fix immutability guarantees in Block (#27844)
This change rearranges the accessor methods in block.go and fixes some minor issues with the copy-on-write logic of block data. Fixed issues: - Block.WithWithdrawals did not create a shallow copy of the block. - Block.WithBody copied the header unnecessarily, and did not preserve withdrawals. However, the bugs did not affect any code in go-ethereum because blocks are *always* created using NewBlockWithHeader().WithBody().WithWithdrawals()
- Loading branch information
Showing
1 changed file
with
63 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters