fix bug about using null PayLoadID

This commit is contained in:
maskpp 2025-05-21 22:34:48 +08:00
parent 63740b7aca
commit c3ed3445f5

View file

@ -208,6 +208,11 @@ 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.
if fcResponse.PayloadStatus.Status == engine.VALID && fcResponse.PayloadID == nil {
return nil
}
envelope, err := c.engineAPI.getPayload(*fcResponse.PayloadID, true)
if err != nil {
return err