worker: Remove staging sectors in PreCommit

This commit is contained in:
Łukasz Magiera 2020-01-15 02:37:25 +01:00
parent 1163e46622
commit cf9275a2a2

View File

@ -116,6 +116,10 @@ func (w *worker) processTask(ctx context.Context, task sectorbuilder.WorkerTask)
if err := w.push("cache", task.SectorID); err != nil {
return errRes(xerrors.Errorf("pushing precommited data: %w", err))
}
if err := w.remove("staging", task.SectorID); err != nil {
return errRes(xerrors.Errorf("cleaning up staged sector: %w", err))
}
case sectorbuilder.WorkerCommit:
proof, err := w.sb.SealCommit(ctx, task.SectorID, task.SealTicket, task.SealSeed, task.Pieces, task.Rspco)
if err != nil {