Uh oh!
There was an error while loading. Please reload this page.
Rename Htlc::to_bitcoin_amount to satoshi_amount - #3099
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
tnull
left a comment
There was a problem hiding this comment.
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)
jirijakes
commented
Jun 6, 2024
@tnull , I called it The 'satoshi' part should invoke that there will be some rounding happening. |
tnull
commented
Jun 6, 2024
Ah, I had forgotten about that. Given that it really just performs integer division, should we be explicit here and call it |
TheBlueMatt
commented
Jun 6, 2024
Naming is hard :). I'm a bit meh on |
TheBlueMatt
commented
Jun 6, 2024
Its not in a release, so there's no impact :) |
tnull
commented
Jun 7, 2024
So |
TheBlueMatt
commented
Jun 7, 2024
That would be good with me, or |
G8XSU
commented
Jun 11, 2024
|
TheBlueMatt
commented
Feb 10, 2026
Closing as supersceded by #4408 |
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.