From c4259cb59423972bd1fba9b094487e44aa5c75fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 16 Mar 2022 12:03:44 +0100 Subject: [PATCH] worker: RemoveCopies expects one type at a time --- extern/sector-storage/stores/remote.go | 2 +- extern/sector-storage/worker_local.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extern/sector-storage/stores/remote.go b/extern/sector-storage/stores/remote.go index d33c01603..42a41f788 100644 --- a/extern/sector-storage/stores/remote.go +++ b/extern/sector-storage/stores/remote.go @@ -46,7 +46,7 @@ type Remote struct { func (r *Remote) RemoveCopies(ctx context.Context, s abi.SectorID, typ storiface.SectorFileType) error { if bits.OnesCount(uint(typ)) != 1 { - return xerrors.New("delete expects one file type") + return xerrors.New("RemoveCopies expects one file type") } if err := r.local.RemoveCopies(ctx, s, typ); err != nil { diff --git a/extern/sector-storage/worker_local.go b/extern/sector-storage/worker_local.go index e86709d72..4f7ae767d 100644 --- a/extern/sector-storage/worker_local.go +++ b/extern/sector-storage/worker_local.go @@ -525,7 +525,7 @@ func (l *LocalWorker) MoveStorage(ctx context.Context, sector storage.SectorRef, continue } - if err := l.storage.RemoveCopies(ctx, sector.ID, types); err != nil { + if err := l.storage.RemoveCopies(ctx, sector.ID, fileType); err != nil { return nil, xerrors.Errorf("rm copies (t:%s, s:%v): %w", fileType, sector, err) } }