Skip to content

Commit 661402d

Browse files
committed
fix: fallback split range safe heads
1 parent 7c80711 commit 661402d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

proposer/op/proposer/range.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,14 @@ func (l *L2OutputSubmitter) GetRangeProofBoundaries(ctx context.Context) error {
195195
var spans []Span
196196
// If the safeDB is activated, we use the safeHead based range splitting algorithm.
197197
// Otherwise, we use the simple range splitting algorithm.
198+
spans = l.SplitRangeBasic(newL2StartBlock, newL2EndBlock)
198199
if safeDBActivated {
199-
spans, err = l.SplitRangeBasedOnSafeHeads(ctx, newL2StartBlock, newL2EndBlock)
200-
if err != nil {
201-
return fmt.Errorf("failed to split range based on safe heads: %w", err)
200+
safeHeadSpans, err := l.SplitRangeBasedOnSafeHeads(ctx, newL2StartBlock, newL2EndBlock)
201+
if err == nil {
202+
spans = safeHeadSpans
203+
} else {
204+
l.Log.Warn("failed to split range based on safe heads, using basic range splitting", "err", err)
202205
}
203-
} else {
204-
spans = l.SplitRangeBasic(newL2StartBlock, newL2EndBlock)
205206
}
206207

207208

0 commit comments

Comments
 (0)