Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add renew max-sectors flag #9941

Merged
merged 3 commits into from
Jan 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions cmd/lotus-miner/sectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,10 @@ var sectorsRenewCmd = &cli.Command{
Usage: "use up to this amount of FIL for one message. pass this flag to avoid message congestion.",
Value: "0",
},
&cli.Int64Flag{
Name: "max-sectors",
Usage: "The maximum number of sectors contained in each message message",
beck-8 marked this conversation as resolved.
Show resolved Hide resolved
},
&cli.BoolFlag{
Name: "really-do-it",
Usage: "pass this flag to really renew sectors, otherwise will only print out json representation of parameters",
Expand Down Expand Up @@ -1020,10 +1024,16 @@ var sectorsRenewCmd = &cli.Command{
for l, exts := range extensions {
for newExp, numbers := range exts {
scount += len(numbers)
addrSectors, err := policy.GetAddressedSectorsMax(nv)
if err != nil {
return err
var addrSectors int
if cctx.Int("max-sectors") == 0 {
addrSectors, err = policy.GetAddressedSectorsMax(nv)
if err != nil {
return err
}
} else {
addrSectors = cctx.Int("max-sectors")
beck-8 marked this conversation as resolved.
Show resolved Hide resolved
}

declMax, err := policy.GetDeclarationsMax(nv)
if err != nil {
return err
Expand Down