sectors expired: Handle precomitted and unproven sectors correctly
This commit is contained in:
@@ -1628,12 +1628,31 @@ var sectorsExpiredCmd = &cli.Command{
|
||||
}
|
||||
|
||||
toCheck, err = bitfield.SubtractBitField(toCheck, live)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
unproven, err := part.UnprovenSectors()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
toCheck, err = bitfield.SubtractBitField(toCheck, unproven)
|
||||
|
||||
return err
|
||||
})
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = mas.ForEachPrecommittedSector(func(pci miner.SectorPreCommitOnChainInfo) error {
|
||||
toCheck.Unset(uint64(pci.Info.SectorNumber))
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if cctx.Bool("remove-expired") {
|
||||
color.Red("Removing sectors:\n")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user