Skip to content

Commit

Permalink
Propose span only if proposedSpanID-2 is finished
Browse files Browse the repository at this point in the history
  • Loading branch information
avalkov committed Jan 8, 2025
1 parent 37360a1 commit 2e3de56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridge/setu/processor/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2e3de56

Please sign in to comment.