Skip to content

Commit 9fa6e3c

Browse files
committed
Fix debug_assert on our_funding_contribution
When processing a splice_ack, the debug_assert on the range of our_funding_contribution should account for values that are for both positive (splice-in) and negative (splice-out).
1 parent ce203f2 commit 9fa6e3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11019,7 +11019,7 @@ where
1101911019
};
1102011020

1102111021
let our_funding_contribution = funding_negotiation_context.our_funding_contribution;
11022-
debug_assert!(our_funding_contribution <= SignedAmount::MAX_MONEY);
11022+
debug_assert!(our_funding_contribution.abs() <= SignedAmount::MAX_MONEY);
1102311023

1102411024
let their_funding_contribution = SignedAmount::from_sat(msg.funding_contribution_satoshis);
1102511025
self.validate_splice_contribution(their_funding_contribution)?;

0 commit comments

Comments
 (0)