Skip to content

Commit 48bebc9

Browse files
committed
miner: simplify check for BeaconRoot
1 parent 3f2219e commit 48bebc9

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

miner/worker.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -962,14 +962,7 @@ func (w *worker) prepareWork(genParams *generateParams) (*environment, error) {
962962
log.Error("Failed to create sealing context", "err", err)
963963
return nil, err
964964
}
965-
if w.chainConfig.IsCancun(header.Number, header.Time) {
966-
if header.BeaconRoot == nil {
967-
// Failure: we are unable to construct a block if we do not have
968-
// the beacon root.
969-
err = errors.New("missing parentBeaconRoot")
970-
log.Error("Failed to construct block", "err", err)
971-
return nil, err
972-
}
965+
if header.BeaconRoot != nil {
973966
context := core.NewEVMBlockContext(header, w.chain, nil)
974967
vmenv := vm.NewEVM(context, vm.TxContext{}, env.state, w.chainConfig, vm.Config{})
975968
core.ProcessBeaconBlockRoot(*header.BeaconRoot, vmenv, env.state)

0 commit comments

Comments
 (0)