Skip to content

Commit 357fc57

Browse files
committed
Oh no, snap is outputting corrupted metadata
1 parent c8f4654 commit 357fc57

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tasks/snap/task_submit.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ func (s *SubmitTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done
262262
if err != nil {
263263
return false, xerrors.Errorf("parsing new sealed cid: %w", err)
264264
}
265+
newUnsealedCID, err := cid.Parse(update.UpdateUnsealedCID)
266+
if err != nil {
267+
return false, xerrors.Errorf("parsing new unsealed cid: %w", err)
268+
}
265269

266270
// Prepare params
267271
params := miner.ProveReplicaUpdates3Params{
@@ -369,7 +373,7 @@ func (s *SubmitTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done
369373
return false, xerrors.Errorf("inserting into message_waits: %w", err)
370374
}
371375

372-
if err := s.transferUpdatedSectorData(ctx, update.SpID, update.SectorNumber, newSealedCID, cid.Undef, mcid); err != nil {
376+
if err := s.transferUpdatedSectorData(ctx, update.SpID, update.SectorNumber, newUnsealedCID, newSealedCID, mcid); err != nil {
373377
return false, xerrors.Errorf("updating sector meta: %w", err)
374378
}
375379

0 commit comments

Comments
 (0)