Skip to content

Commit 6cec735

Browse files
committed
Use MAX_MSATS instead of magic value
1 parent d071ce2 commit 6cec735

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/amount.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ impl Amount {
8989
#[inline]
9090
pub const fn saturating_add(self, rhs: Amount) -> Amount {
9191
match self.0.checked_add(rhs.0) {
92-
Some(amt) if amt <= 21_000_000_0000_0000_000 => Amount(amt),
93-
_ => Amount(21_000_000_0000_0000_000),
92+
Some(amt) if amt <= MAX_MSATS => Amount(amt),
93+
_ => Amount(MAX_MSATS),
9494
}
9595
}
9696

0 commit comments

Comments
 (0)