Skip to content

Commit

Permalink
sealing: Don't panic in ReleaseUnsealed with no ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Apr 9, 2022
1 parent 7900479 commit 3ecb1fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extern/sector-storage/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ func (m *Manager) ReleaseUnsealed(ctx context.Context, sector storage.SectorRef,
if err != nil {
return err
}
if len(safeToFree) != 0 || safeToFree[0].Offset != 0 || safeToFree[0].Size.Padded() != abi.PaddedPieceSize(ssize) {
if len(safeToFree) == 0 || safeToFree[0].Offset != 0 || safeToFree[0].Size.Padded() != abi.PaddedPieceSize(ssize) {
// todo support partial free
return nil
}
Expand Down

0 comments on commit 3ecb1fd

Please sign in to comment.