Skip to content

Commit

Permalink
Change PostCopy(dst, src) -> PostCopy(dst)
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Jan 31, 2025
1 parent f8a0ea3 commit 9236b52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func CopyHeader(h *Header) *Header {
cpy.ParentBeaconRoot = new(common.Hash)
*cpy.ParentBeaconRoot = *h.ParentBeaconRoot
}
h.hooks().PostCopy(&cpy, h)
h.hooks().PostCopy(&cpy)
return &cpy
}

Expand Down
4 changes: 2 additions & 2 deletions core/types/block.libevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type HeaderHooks interface {
UnmarshalJSON(*Header, []byte) error //nolint:govet
EncodeRLP(*Header, io.Writer) error
DecodeRLP(*Header, *rlp.Stream) error
PostCopy(dst, src *Header)
PostCopy(dst *Header)
}

// hooks returns the Header's registered HeaderHooks, if any, otherwise a
Expand Down Expand Up @@ -110,4 +110,4 @@ func (*NOOPHeaderHooks) DecodeRLP(h *Header, s *rlp.Stream) error {
return s.Decode((*withoutMethods)(h))
}

func (n *NOOPHeaderHooks) PostCopy(dst, src *Header) {}
func (n *NOOPHeaderHooks) PostCopy(dst *Header) {}
2 changes: 1 addition & 1 deletion core/types/block.libevm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (hh *stubHeaderHooks) DecodeRLP(h *Header, s *rlp.Stream) error {
return hh.errDecode
}

func (hh *stubHeaderHooks) PostCopy(dst, src *Header) {}
func (hh *stubHeaderHooks) PostCopy(dst *Header) {}

func TestHeaderHooks(t *testing.T) {
TestOnlyClearRegisteredExtras()
Expand Down

0 comments on commit 9236b52

Please sign in to comment.