Skip to content

Commit

Permalink
index out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
puntung committed Sep 6, 2021
1 parent 212400b commit 179458e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extern/storage-sealing/commit_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ func (b *CommitBatcher) processBatch(cfg sealiface.Config) ([]sealiface.CommitBa
infos = append(infos, p.Info)
}

if len(infos) == 0 {
return nil, nil
}

sort.Slice(infos, func(i, j int) bool {
return infos[i].Number < infos[j].Number
})
Expand Down

0 comments on commit 179458e

Please sign in to comment.