From 2e3de565a7c35b5c84899c3c5d63adf976171a61 Mon Sep 17 00:00:00 2001 From: Angel Valkov Date: Wed, 8 Jan 2025 10:18:17 +0200 Subject: [PATCH] Propose span only if proposedSpanID-2 is finished --- bridge/setu/processor/span.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bridge/setu/processor/span.go b/bridge/setu/processor/span.go index 5a717862d..39350ee0f 100644 --- a/bridge/setu/processor/span.go +++ b/bridge/setu/processor/span.go @@ -81,6 +81,10 @@ func (sp *SpanProcessor) checkAndPropose() { return } + if !sp.contractConnector.CheckIfBlocksExist(lastSpan.StartBlock) { + return + } + sp.Logger.Debug("Found last span", "lastSpan", lastSpan.ID, "startBlock", lastSpan.StartBlock, "endBlock", lastSpan.EndBlock) nextSpanMsg, err := sp.fetchNextSpanDetails(lastSpan.ID+1, lastSpan.EndBlock+1)