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: use a consistent tipset in commands #6142

Merged
merged 1 commit into from
Apr 29, 2021
Merged

fix: use a consistent tipset in commands #6142

merged 1 commit into from
Apr 29, 2021

Conversation

Stebalien
Copy link
Member

It's very easy to write an incorrect command that operates over different heads by using the "empty" tipset. This change makes the LoadTipSet command helper get the latest head from the lotus daemon if its unset.

The cost is an extra call to get the head. That should be trivial in most cases.

It's very easy to write an incorrect command that operates over
different heads by using the "empty" tipset. This change makes the
`LoadTipSet` command helper get the latest head from the lotus daemon if
its unset.

The cost is an extra call to get the head. That should be trivial in
most cases.
@@ -723,12 +723,6 @@ var ChainGetCmd = &cli.Command{
return err
}

if ts == nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

We now always do this.

@magik6k magik6k merged commit 002eb4e into master Apr 29, 2021
@magik6k magik6k deleted the fix/tipset-cli branch April 29, 2021 16: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