Merge pull request #3657 from filecoin-project/fix/stg-sealer-read-piece

storage: return true from Sealer.ReadPiece() on success
This commit is contained in:
Łukasz Magiera 2020-09-08 14:44:30 +02:00 committed by GitHub
commit e87ccbfa22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -410,7 +410,7 @@ func (sb *Sealer) ReadPiece(ctx context.Context, writer io.Writer, sector abi.Se
return false, xerrors.Errorf("closing partial file: %w", err) return false, xerrors.Errorf("closing partial file: %w", err)
} }
return false, nil return true, nil
} }
func (sb *Sealer) SealPreCommit1(ctx context.Context, sector abi.SectorID, ticket abi.SealRandomness, pieces []abi.PieceInfo) (out storage.PreCommit1Out, err error) { func (sb *Sealer) SealPreCommit1(ctx context.Context, sector abi.SectorID, ticket abi.SealRandomness, pieces []abi.PieceInfo) (out storage.PreCommit1Out, err error) {

View File

@ -272,7 +272,7 @@ func (m *Manager) ReadPiece(ctx context.Context, sink io.Writer, sector abi.Sect
return xerrors.Errorf("reading piece from sealed sector: %w", err) return xerrors.Errorf("reading piece from sealed sector: %w", err)
} }
if readOk { if !readOk {
return xerrors.Errorf("failed to read unsealed piece") return xerrors.Errorf("failed to read unsealed piece")
} }