From 87b82b95c8fcf88be7b95ced2e72007834e92de3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Thu, 18 Aug 2022 11:03:26 -0400 Subject: [PATCH] feat: sectors renew --only-cc --- cmd/lotus-miner/sectors.go | 8 ++++++++ documentation/en/cli-lotus-miner.md | 1 + 2 files changed, 9 insertions(+) diff --git a/cmd/lotus-miner/sectors.go b/cmd/lotus-miner/sectors.go index be5623c27..e749e5590 100644 --- a/cmd/lotus-miner/sectors.go +++ b/cmd/lotus-miner/sectors.go @@ -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) diff --git a/documentation/en/cli-lotus-miner.md b/documentation/en/cli-lotus-miner.md index c23e4bb30..bb1bacf4b 100644 --- a/documentation/en/cli-lotus-miner.md +++ b/documentation/en/cli-lotus-miner.md @@ -1789,6 +1789,7 @@ OPTIONS: --from value only consider sectors whose current expiration epoch is in the range of [from, to], defaults to: now + 120 (1 hour) (default: 0) --max-fee value use up to this amount of FIL for one message. pass this flag to avoid message congestion. (default: "0") --new-expiration value try to extend selected sectors to this epoch, ignoring extension (default: 0) + --only-cc only extend CC sectors (useful for making sector ready for snap upgrade) (default: false) --really-do-it pass this flag to really renew sectors, otherwise will only print out json representation of parameters (default: false) --sector-file value provide a file containing one sector number in each line, ignoring above selecting criteria --to value only consider sectors whose current expiration epoch is in the range of [from, to], defaults to: now + 92160 (32 days) (default: 0)