diff --git a/eth/catalyst/simulated_beacon.go b/eth/catalyst/simulated_beacon.go index b84df9a4d6..0642d6a1ad 100644 --- a/eth/catalyst/simulated_beacon.go +++ b/eth/catalyst/simulated_beacon.go @@ -208,6 +208,12 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal, timestamp u return errors.New("chain rewind prevented invocation of payload creation") } + // If the payload was already known, we can skip the rest of the process. + // This edge case is possible due to a race condition between seal and debug.setHead. + if fcResponse.PayloadStatus.Status == engine.VALID && fcResponse.PayloadID == nil { + return nil + } + envelope, err := c.engineAPI.getPayload(*fcResponse.PayloadID, true) if err != nil { return err