wdpost: Correctly skip partitions with no sectors

This commit is contained in:
Łukasz Magiera 2020-07-23 11:13:02 +02:00
parent 78f7a96300
commit 1e6afb3b73

View File

@ -331,7 +331,7 @@ func (s *WindowPoStScheduler) runPost(ctx context.Context, di miner.DeadlineInfo
params := &miner.SubmitWindowedPoStParams{ params := &miner.SubmitWindowedPoStParams{
Deadline: di.Index, Deadline: di.Index,
Partitions: make([]miner.PoStPartition, len(partitions)), Partitions: make([]miner.PoStPartition, 0, len(partitions)),
Proofs: nil, Proofs: nil,
} }
@ -382,10 +382,10 @@ func (s *WindowPoStScheduler) runPost(ctx context.Context, di miner.DeadlineInfo
sidToPart[si.SectorNumber] = uint64(partIdx) sidToPart[si.SectorNumber] = uint64(partIdx)
} }
params.Partitions[partIdx] = miner.PoStPartition{ params.Partitions = append(params.Partitions, miner.PoStPartition{
Index: uint64(partIdx), Index: uint64(partIdx),
Skipped: skipped, Skipped: skipped,
} })
} }
if len(sinfos) == 0 { if len(sinfos) == 0 {