feat: sectors renew --only-cc

This commit is contained in:
Łukasz Magiera
2022-08-18 11:04:20 -04:00
parent b5ac141936
commit 87b82b95c8
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -796,6 +796,10 @@ var sectorsRenewCmd = &cli.Command{
Name: "new-expiration",
Usage: "try to extend selected sectors to this epoch, ignoring extension",
},
&cli.BoolFlag{
Name: "only-cc",
Usage: "only extend CC sectors (useful for making sector ready for snap upgrade)",
},
&cli.Int64Flag{
Name: "tolerance",
Usage: "don't try to extend sectors by fewer than this number of epochs, defaults to 7 days",
@@ -931,6 +935,10 @@ var sectorsRenewCmd = &cli.Command{
}
for _, si := range activeSet {
if len(si.DealIDs) > 0 && cctx.Bool("only-cc") {
continue
}
if si.Expiration >= from && si.Expiration <= to {
if _, exclude := excludeSet[uint64(si.SectorNumber)]; !exclude {
sis = append(sis, si)