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

[trivial] lntest/node: print amounts in same format #2496

Merged
merged 1 commit into from
Feb 1, 2019

Conversation

halseth
Copy link
Contributor

@halseth halseth commented Jan 17, 2019

No description provided.

joostjager
joostjager previously approved these changes Jan 17, 2019
lntest/node.go Outdated
@@ -938,7 +938,8 @@ func (hn *HarnessNode) WaitForBalance(expectedBalance int64, confirmed bool) err
err := WaitPredicate(doesBalanceMatch, 30*time.Second)
if err != nil {
return fmt.Errorf("balances not synced after deadline: "+
"expected %v, only have %v", expectedBalance, lastBalance)
"expected %v, only have %v",
btcutil.Amount(expectedBalance), lastBalance)
Copy link
Contributor

Choose a reason for hiding this comment

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

Alternative could be to change the func argument to btcutil.Amount.

Copy link
Contributor

Choose a reason for hiding this comment

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

fmt.Errorf call not formatted according to guide lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternative could be to change the func argument to btcutil.Amount.

Yeah, I would also prefer that. Turned out we are using the proto fields (which are int64) directly many places, so the diff became too big to make it worth it I think.

fmt.Errorf call not formatted according to guide lines.

We usually try to keep logs and errors over as few lines as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the diff didn't become that bad, so I'll do what you initially suggested :)

Copy link
Contributor

Choose a reason for hiding this comment

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

We usually try to keep logs and errors over as few lines as possible.

Ah, I see now that that exception indeed landed in the contribution guidelines.

Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

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

LGTM 🕷

@wpaulino wpaulino merged commit 8d7879b into lightningnetwork:master Feb 1, 2019
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