Merge pull request #2521 from chunqizhi/wenchu02

Fix bug when run windowPost
This commit is contained in:
Łukasz Magiera 2020-07-22 18:12:59 +02:00 committed by GitHub
commit c466bb1696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -373,15 +373,15 @@ 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")
}
params.Partitions[partIdx] = miner.PoStPartition{
Index: uint64(partIdx),