-
Notifications
You must be signed in to change notification settings - Fork 417
Rename Htlc::to_bitcoin_amount
to satoshi_amount
#3099
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3099 +/- ##
==========================================
+ Coverage 89.86% 89.96% +0.09%
==========================================
Files 119 119
Lines 97507 98177 +670
Branches 97507 98177 +670
==========================================
+ Hits 87629 88324 +695
+ Misses 7307 7291 -16
+ Partials 2571 2562 -9 ☔ View full report in Codecov by Sentry. |
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.
Generally looks good, although tbh. I find satoshi_amount
also a bit confusing as the Amount
type's point is exactly that is independent of a denomination.
Should the method maybe be just be named fn amount(&self) -> Amount
or fn as_amount(&self) -> Amount
?
(cc @TheBlueMatt as he made the original comment)
@tnull , I called it The 'satoshi' part should invoke that there will be some rounding happening. |
Ah, I had forgotten about that. Given that it really just performs integer division, should we be explicit here and call it |
Naming is hard :). I'm a bit meh on |
Its not in a release, so there's no impact :) |
So |
That would be good with me, or |
|
Per #3063 (comment) .
I believe it's soon enough after the method was first introduced that renaming it should not have big negative impact, if any.