Commit e7f3c5b8 authored by protolambda's avatar protolambda

op-node: add sanity check to tryNextSafeAttributes function

parent ea7c49d0
...@@ -430,6 +430,9 @@ func (eq *EngineQueue) tryNextUnsafePayload(ctx context.Context) error { ...@@ -430,6 +430,9 @@ func (eq *EngineQueue) tryNextUnsafePayload(ctx context.Context) error {
} }
func (eq *EngineQueue) tryNextSafeAttributes(ctx context.Context) error { func (eq *EngineQueue) tryNextSafeAttributes(ctx context.Context) error {
if eq.safeAttributes == nil { // sanity check the attributes are there
return nil
}
// validate the safe attributes before processing them. The engine may have completed processing them through other means. // validate the safe attributes before processing them. The engine may have completed processing them through other means.
if eq.safeHead != eq.safeAttributesParent { if eq.safeHead != eq.safeAttributesParent {
if eq.safeHead.ParentHash != eq.safeAttributesParent.Hash { if eq.safeHead.ParentHash != eq.safeAttributesParent.Hash {
......
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