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

fix extend v1 sector #6033

Closed

Conversation

TerenceClark
Copy link

No description provided.

@jennijuju jennijuju added the P2 P2: Should be resolved label May 24, 2021
@jennijuju jennijuju linked an issue May 24, 2021 that may be closed by this pull request
3 tasks
@@ -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) {
Copy link
Contributor

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 {
Copy link
Contributor

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.

@arajasek arajasek enabled auto-merge July 11, 2021 16:47
@arajasek arajasek disabled auto-merge July 11, 2021 16:58
@arajasek
Copy link
Contributor

Closing in favour of #6066

@arajasek arajasek closed this Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 P2: Should be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] sectors extend --v1-sectors bugs
3 participants