-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!(core/types): Block
method WithBody(Body)
signature
#110
Conversation
801e855
to
c0f677c
Compare
BlockWithBodyOption
variadic argument to Block.WithBodyWithExtra
hook and InspectDatabase
variadic options
c0f677c
to
16cfcdf
Compare
WithExtra
hook and InspectDatabase
variadic optionsWithBody
hook
WithBody
hookBlock.WithBody(*Body)
signature
16cfcdf
to
9c584ab
Compare
aef72be
to
9f1862b
Compare
|
…drawals" This reverts commit b117d9a.
Thanks for this, somehow I totally omitted to write this which is kind of a big deal. |
## Why this should be merged #110 introduces changes that we want to revert as part of the next Geth sync. This label will be applied to issues that track similar tasks. ## How this works Magic 🧙 ## How this was tested Inspecting [CI dry run, which creates the new label](https://github.com/ava-labs/libevm/actions/runs/13261362433/job/37018526246?pr=129#step:3:99). Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
@@ -843,7 +843,12 @@ func ReadBadBlock(db ethdb.Reader, hash common.Hash) *types.Block { | |||
} | |||
for _, bad := range badBlocks { | |||
if bad.Header.Hash() == hash { | |||
return types.NewBlockWithHeader(bad.Header).WithBody(bad.Body.Transactions, bad.Body.Uncles).WithWithdrawals(bad.Body.Withdrawals) | |||
block := types.NewBlockWithHeader(bad.Header) | |||
if bad.Body != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(remark) This suggests that they thought the old version could have a nil-pointer dereference.
Co-authored-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com> Signed-off-by: Quentin McGaw <quentin.mcgaw@gmail.com>
Block.WithBody(*Body)
signatureBlock
method WithBody(Body)
signature
Breaking change refactoring
core/types.Block.WithBody()
method from signatureto signature
such that block and body extras can be used within
WithBody
.Note
geth
made the same change in method signature so the deltas introduced in this PR will disappear once we sync.