mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
Update simulate.go
This commit is contained in:
parent
49fba66f63
commit
dd9ea020c3
1 changed files with 0 additions and 4 deletions
|
|
@ -578,10 +578,6 @@ func (sim *simulator) makeHeaders(blocks []simBlock) ([]*types.Header, error) {
|
||||||
ParentBeaconRoot: parentBeaconRoot,
|
ParentBeaconRoot: parentBeaconRoot,
|
||||||
})
|
})
|
||||||
// A difficulty override is documented as a no-op for post-merge blocks.
|
// A difficulty override is documented as a no-op for post-merge blocks.
|
||||||
// MakeHeader applies it unconditionally though, so re-zero it here: a
|
|
||||||
// non-zero difficulty makes the simulated header fail IsPoSHeader, which
|
|
||||||
// routes block assembly through the legacy (PoW) engine even though the
|
|
||||||
// block carries post-merge fields, leading to a panic.
|
|
||||||
if isPostMerge {
|
if isPostMerge {
|
||||||
header.Difficulty = big.NewInt(0)
|
header.Difficulty = big.NewInt(0)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue