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 get sector bug #4976

Merged
merged 1 commit into from
Nov 23, 2020
Merged

Conversation

zlhwdsz
Copy link
Contributor

@zlhwdsz zlhwdsz commented Nov 23, 2020

This PR aims to fix a panic bug when check nonexistent sectors with the following command:

lotus state sector [miner address] [sector number]

Comment on lines 89 to 91
if !ok {
return nil, xerrors.Errorf("sector %d not found", num)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't correct, some callers of this method expect a nil value when the sectors isn't found

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I modified the code elsewhere instead, please review it again.

@magik6k magik6k merged commit ffa9638 into filecoin-project:master Nov 23, 2020
@zlhwdsz zlhwdsz deleted the fix-get-sector branch January 9, 2021 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants