-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix bugs in sectors extend --v1-sectors #6066
Fix bugs in sectors extend --v1-sectors #6066
Conversation
this could address #6180 too |
@@ -507,6 +517,10 @@ var sectorsExtendCmd = &cli.Command{ | |||
|
|||
// Set the new expiration to 48 hours less than the theoretical maximum lifetime | |||
newExp := ml - (miner3.WPoStProvingPeriod * 2) + si.Activation | |||
if withinTolerance(si.Expiration, newExp) || si.Expiration >= newExp { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of these should be redundant thanks to the check in line 514, but no reason to omit.
@@ -435,6 +435,12 @@ var sectorsExtendCmd = &cli.Command{ | |||
Usage: "when extending v1 sectors, don't try to extend sectors by fewer than this number of epochs", | |||
Required: false, | |||
}, | |||
&cli.Int64Flag{ | |||
Name: "expiration-ignore", | |||
Value: 120, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a larger default than 2 hours, but users need to be specifying this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I've made one necessary change and this is good to go.
It doesn't address it, but the solution to 6180 will share similar logic to the v1 sector extension logic. |
Fix bugs described in #6027
Based on the work of #6033