From 8d28b727413f5b4cb26e81dd4123a107c755cd2f Mon Sep 17 00:00:00 2001 From: chunqizhi <1558763837@qq.com> Date: Wed, 22 Jul 2020 17:02:46 +0800 Subject: [PATCH] Fix bug when run windowPost --- storage/wdpost_run.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/storage/wdpost_run.go b/storage/wdpost_run.go index abe3e8f4c..b1505e89d 100644 --- a/storage/wdpost_run.go +++ b/storage/wdpost_run.go @@ -373,15 +373,19 @@ func (s *WindowPoStScheduler) runPost(ctx context.Context, di miner.DeadlineInfo return nil, xerrors.Errorf("getting sorted sector info: %w", err) } + if len(ssi) == 0 { + continue + } + sinfos = append(sinfos, ssi...) for _, si := range ssi { sidToPart[si.SectorNumber] = uint64(partIdx) } - if len(ssi) == 0 { - log.Warn("attempted to run windowPost without any sectors...") - return nil, xerrors.Errorf("no sectors to run windowPost on") - } + //if len(ssi) == 0 { + // log.Warn("attempted to run windowPost without any sectors...") + // return nil, xerrors.Errorf("no sectors to run windowPost on") + //} params.Partitions[partIdx] = miner.PoStPartition{ Index: uint64(partIdx),