-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[trivial] lntest/node: print amounts in same format #2496
Conversation
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) |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
e7b0a4b
to
adb512e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🕷
No description provided.