Skip to content

Commit

Permalink
Merge pull request ethereum-optimism#5751 from ethereum-optimism/bugf…
Browse files Browse the repository at this point in the history
…ix/wheel-header-copy

op-wheel: Copy the header safely
  • Loading branch information
OptimismBot authored May 19, 2023
2 parents fc56ded + dfdbf72 commit 4f228fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion op-wheel/cheat/cheat.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"path/filepath"
"strings"

"github.com/ethereum/go-ethereum/core/types"

"github.com/ethereum-optimism/optimism/op-node/eth"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/beacon"
Expand Down Expand Up @@ -104,7 +106,7 @@ func (ch *Cheater) RunAndClose(fn HeadFn) error {
_ = ch.Close()
return fmt.Errorf("failed to commit state change: %w", err)
}
header := preHeader // copy the header
header := types.CopyHeader(preHeader) // copy the header
header.Root = stateRoot
blockHash := header.Hash()

Expand Down

0 comments on commit 4f228fe

Please sign in to comment.