add renew max-sectors flag
This commit is contained in:
parent
cf6593ff50
commit
0f9d198dbd
@ -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.",
|
Usage: "use up to this amount of FIL for one message. pass this flag to avoid message congestion.",
|
||||||
Value: "0",
|
Value: "0",
|
||||||
},
|
},
|
||||||
|
&cli.Int64Flag{
|
||||||
|
Name: "max-sectors",
|
||||||
|
Usage: "The maximum number of sectors contained in each message message",
|
||||||
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
Name: "really-do-it",
|
Name: "really-do-it",
|
||||||
Usage: "pass this flag to really renew sectors, otherwise will only print out json representation of parameters",
|
Usage: "pass this flag to really renew sectors, otherwise will only print out json representation of parameters",
|
||||||
@ -1020,10 +1024,16 @@ var sectorsRenewCmd = &cli.Command{
|
|||||||
for l, exts := range extensions {
|
for l, exts := range extensions {
|
||||||
for newExp, numbers := range exts {
|
for newExp, numbers := range exts {
|
||||||
scount += len(numbers)
|
scount += len(numbers)
|
||||||
addrSectors, err := policy.GetAddressedSectorsMax(nv)
|
var addrSectors int
|
||||||
|
if cctx.Int("max-sectors") == 0 {
|
||||||
|
addrSectors, err = policy.GetAddressedSectorsMax(nv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
addrSectors = cctx.Int("max-sectors")
|
||||||
|
}
|
||||||
|
|
||||||
declMax, err := policy.GetDeclarationsMax(nv)
|
declMax, err := policy.GetDeclarationsMax(nv)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user