-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
btcutil: format BTC amounts with trailing zeroes #1996
Conversation
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.
Thanks for the change, this has bugged me before as well.
Can be simplified quite a bit IMO.
Thanks, that's Go code written by a Java programmer :) I'll tidy it up! |
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.
Thanks, LGTM 🎉
Pull Request Test Coverage Report for Build 5456779174
💛 - Coveralls |
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.
Code change ack, but could we accidentally break any code parsing these strings?
so that sat amounts can be read without counting zeroes before: 350sat = 0.0000035 BTC 3500sat = 0.000035 BTC after: 350sat = 0.00000350 BTC 3500sat = 0.00003500 BTC fixes btcsuite#1995
Yes, code parsing this might be affected. We're not changing the amount and 1.5 = 1.50, so it shouldn't cause massive headaches. It's a risk, though, and I'm not in a position to decide for or against this. |
cc @Roasbeef |
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 📸
so that sat amounts can be read without counting zeroes
before:
after:
fixes #1995