Commit 81976a4d authored by Axel Kingsley's avatar Axel Kingsley Committed by GitHub

add additional check (#9560)

parent 8fb5be5f
...@@ -172,7 +172,8 @@ func (e *EngineController) StartPayload(ctx context.Context, parent eth.L2BlockR ...@@ -172,7 +172,8 @@ func (e *EngineController) StartPayload(ctx context.Context, parent eth.L2BlockR
} }
func (e *EngineController) ConfirmPayload(ctx context.Context, agossip async.AsyncGossiper, sequencerConductor conductor.SequencerConductor) (out *eth.ExecutionPayloadEnvelope, errTyp BlockInsertionErrType, err error) { func (e *EngineController) ConfirmPayload(ctx context.Context, agossip async.AsyncGossiper, sequencerConductor conductor.SequencerConductor) (out *eth.ExecutionPayloadEnvelope, errTyp BlockInsertionErrType, err error) {
if e.buildingInfo == (eth.PayloadInfo{}) { // don't create a BlockInsertPrestateErr if we have a cached gossip payload
if e.buildingInfo == (eth.PayloadInfo{}) && agossip.Get() == nil {
return nil, BlockInsertPrestateErr, fmt.Errorf("cannot complete payload building: not currently building a payload") return nil, BlockInsertPrestateErr, fmt.Errorf("cannot complete payload building: not currently building a payload")
} }
if e.buildingOnto.Hash != e.unsafeHead.Hash { // E.g. when safe-attributes consolidation fails, it will drop the existing work. if e.buildingOnto.Hash != e.unsafeHead.Hash { // E.g. when safe-attributes consolidation fails, it will drop the existing work.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment