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

polish(errors): better state tree errors #6923

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

frrist
Copy link
Member

@frrist frrist commented Jul 29, 2021

StateTree is failing to load for Lily is processing the chain. Make these errors more informative.

@frrist frrist self-assigned this Jul 29, 2021
@frrist frrist requested a review from a team as a code owner July 29, 2021 00:23
@frrist frrist requested a review from whyrusleeping July 29, 2021 00:23
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

LGTM modulo a nit.

@@ -273,7 +273,7 @@ func LoadStateTree(cst cbor.IpldStore, c cid.Cid) (*StateTree, error) {
}
if err != nil {
log.Errorf("failed to load state tree: %s", err)
return nil, xerrors.Errorf("failed to load state tree: %w", err)
return nil, xerrors.Errorf("failed to load state tree %s: %w", c.String(), err)
Copy link
Member

Choose a reason for hiding this comment

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

Don't bother calling .String(), it'll be called automatically when formatting.

Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

what steb said

@frrist frrist force-pushed the frrist/better-state-tree-errors branch from 9cd689d to 256d127 Compare July 29, 2021 00:50
@frrist
Copy link
Member Author

frrist commented Jul 29, 2021

addressed.

@Stebalien Stebalien merged commit 6ffcf61 into master Jul 29, 2021
@Stebalien Stebalien deleted the frrist/better-state-tree-errors branch July 29, 2021 01:35
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