Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/amount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use core::fmt;

/// An amount of Bitcoin
///
/// Sadly, because lightning uses "milli-satoshis" we cannot directly use rust-bitcon's `Amount`
/// Sadly, because lightning uses "milli-satoshis" we cannot directly use rust-bitcoin's `Amount`
/// type.
///
/// In general, when displaying amounts to the user, you should use [`Self::sats_rounding_up`].
Expand Down Expand Up @@ -89,8 +89,8 @@ impl Amount {
#[inline]
pub const fn saturating_add(self, rhs: Amount) -> Amount {
match self.0.checked_add(rhs.0) {
Some(amt) if amt <= 21_000_000_0000_0000_000 => Amount(amt),
_ => Amount(21_000_000_0000_0000_000),
Some(amt) if amt <= MAX_MSATS => Amount(amt),
_ => Amount(MAX_MSATS),
}
}

Expand Down
Loading