From 5d9d51ba2de5051499ca6c30eb41462ff1f643ce Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Fri, 20 Dec 2019 19:33:11 -0800 Subject: [PATCH] don't fail execution if the fault set contains an invalid sector ID --- chain/actors/actor_miner.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chain/actors/actor_miner.go b/chain/actors/actor_miner.go index 12fe84522..53a8d303d 100644 --- a/chain/actors/actor_miner.go +++ b/chain/actors/actor_miner.go @@ -721,8 +721,10 @@ func RemoveFromSectorSet(ctx context.Context, s types.Storage, ss cid.Cid, ids [ return cid.Undef, aerrors.HandleExternalError(err, "could not load sector set node") } - if err := ssr.BatchDelete(ids); err != nil { - return cid.Undef, aerrors.HandleExternalError(err, "failed to delete from sector set") + for _, id := range ids { + if err := ssr.Delete(id); err != nil { + log.Warnf("failed to delete sector %d from set: %s", id, err) + } } ncid, err := ssr.Flush()