sealing: Don't panic in ReleaseUnsealed with no ranges

This commit is contained in:
Łukasz Magiera 2022-04-09 20:58:47 +02:00
parent 7900479e9c
commit 3ecb1fd5d9

View File

@ -705,7 +705,7 @@ func (m *Manager) ReleaseUnsealed(ctx context.Context, sector storage.SectorRef,
if err != nil { if err != nil {
return err 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 // todo support partial free
return nil return nil
} }