mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-04-23 03:00:50 -04:00
fix nil pointer if there's no pending batches
This commit is contained in:
@@ -327,6 +327,11 @@ func (r *Layer2Relayer) ProcessPendingBatches() {
|
||||
return
|
||||
}
|
||||
|
||||
// nothing to do if we don't have any pending batches
|
||||
if len(dbBatches) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// if backlog outgrow max size, force‐submit enough oldest batches
|
||||
backlogCount, err := r.batchOrm.GetFailedAndPendingBatchesCount(r.ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user