-
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 extend v1 sector #6033
fix extend v1 sector #6033
Conversation
@@ -507,6 +507,9 @@ 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) { |
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.
This is somewhat redundant due to the check on line 504, but happy to allow it.
@@ -524,7 +527,8 @@ var sectorsExtendCmd = &cli.Command{ | |||
} else { | |||
added := false | |||
for exp := range es { | |||
if withinTolerance(exp, newExp) { | |||
// newExp < exp, can't extend | |||
if withinTolerance(exp, newExp) && newExp >= exp { |
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.
Nice catch, thank you! The optimal thing to do would be to repack the extensions, replacing exp
with the smaller newExp
in this case, but I don't think it's too important.
Closing in favour of #6066 |
No description provided.