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
8 changes: 4 additions & 4 deletions lightning/src/ln/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2664,8 +2664,8 @@ impl FundingScope {
their_funding_contribution: SignedAmount, counterparty_funding_pubkey: PublicKey,
our_new_holder_keys: ChannelPublicKeys,
) -> Self {
debug_assert!(our_funding_contribution.abs() <= SignedAmount::MAX_MONEY);
debug_assert!(their_funding_contribution.abs() <= SignedAmount::MAX_MONEY);
debug_assert!(our_funding_contribution.unsigned_abs() <= Amount::MAX_MONEY);
debug_assert!(their_funding_contribution.unsigned_abs() <= Amount::MAX_MONEY);

let post_channel_value = prev_funding.compute_post_splice_value(
our_funding_contribution.to_sat(),
Expand Down Expand Up @@ -12155,15 +12155,15 @@ where
fn validate_splice_contributions(
&self, our_funding_contribution: SignedAmount, their_funding_contribution: SignedAmount,
) -> Result<(), String> {
if our_funding_contribution.abs() > SignedAmount::MAX_MONEY {
if our_funding_contribution.unsigned_abs() > Amount::MAX_MONEY {
return Err(format!(
"Channel {} cannot be spliced; our {} contribution exceeds the total bitcoin supply",
self.context.channel_id(),
our_funding_contribution,
));
}

if their_funding_contribution.abs() > SignedAmount::MAX_MONEY {
if their_funding_contribution.unsigned_abs() > Amount::MAX_MONEY {
return Err(format!(
"Channel {} cannot be spliced; their {} contribution exceeds the total bitcoin supply",
self.context.channel_id(),
Expand Down
Loading