failed sectors should be added into res correctly

This commit is contained in:
wangchao 2021-06-11 10:33:57 +08:00 committed by Aayush Rajasekaran
parent d3594a014b
commit 4da30931c9

View File

@ -246,6 +246,8 @@ func (b *CommitBatcher) processBatch(cfg sealiface.Config) ([]sealiface.CommitBa
break break
} }
res.Sectors = append(res.Sectors, id)
sc, err := b.getSectorCollateral(id, tok) sc, err := b.getSectorCollateral(id, tok)
if err != nil { if err != nil {
res.FailedSectors[id] = err.Error() res.FailedSectors[id] = err.Error()
@ -254,7 +256,6 @@ func (b *CommitBatcher) processBatch(cfg sealiface.Config) ([]sealiface.CommitBa
collateral = big.Add(collateral, sc) collateral = big.Add(collateral, sc)
res.Sectors = append(res.Sectors, id)
params.SectorNumbers.Set(uint64(id)) params.SectorNumbers.Set(uint64(id))
infos = append(infos, p.info) infos = append(infos, p.info)
} }