eq.log.Info("skipping unsafe payload, since it is older than safe head","safe",eq.ec.SafeL2Head().ID(),"unsafe",eq.ec.UnsafeL2Head().ID(),"unsafe_payload",first.ID())
eq.unsafePayloads.Pop()
returnnil
iffirst.BlockHash==x.UnsafeL2Head.Hash{
eq.log.Debug("successfully processed payload, removing it from the payloads queue now")
eq.log.Info("skipping unsafe payload, since it is older than unsafe head","unsafe",eq.ec.UnsafeL2Head().ID(),"unsafe_payload",first.ID())
eq.unsafePayloads.Pop()
returnnil
ifuint64(first.BlockNumber)<=x.SafeL2Head.Number{
eq.log.Info("skipping unsafe payload, since it is older than safe head","safe",x.SafeL2Head.ID(),"unsafe",x.UnsafeL2Head.ID(),"unsafe_payload",first.ID())
eq.log.Info("skipping unsafe payload, since it does not build onto the existing unsafe chain","safe",eq.ec.SafeL2Head().ID(),"unsafe",eq.ec.UnsafeL2Head().ID(),"unsafe_payload",first.ID())
eq.log.Info("skipping unsafe payload, since it does not build onto the existing unsafe chain","safe",x.SafeL2Head.ID(),"unsafe",x.UnsafeL2Head.ID(),"unsafe_payload",first.ID())
returntrue,false
}
returnio.EOF// time to go to next stage if we cannot process the first unsafe payload
returnfalse,true// rollup-node should try something different if it cannot process the first unsafe payload
}
ref,err:=derive.PayloadToBlockRef(eq.cfg,first)
iferr!=nil{
eq.log.Error("failed to decode L2 block ref from payload","err",err)
eq.unsafePayloads.Pop()
returnnil
returnfalse,false
}
// AddUnsafePayload schedules an execution payload to be processed, ahead of deriving it from L1.