Skip to content

Commit

Permalink
fix: return true from Sealer.ReadPiece() on success
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed Sep 8, 2020
1 parent 8bbdf2e commit 17c15a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extern/sector-storage/ffiwrapper/sealer_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, 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) {
Expand Down
2 changes: 1 addition & 1 deletion extern/sector-storage/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

if readOk {
if !readOk {
return xerrors.Errorf("failed to read unsealed piece")
}

Expand Down

0 comments on commit 17c15a7

Please sign in to comment.