File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -11023,6 +11023,22 @@ where
11023
11023
)));
11024
11024
}
11025
11025
11026
+ let their_channel_balance = Amount::from_sat(self.funding.get_value_satoshis())
11027
+ - Amount::from_sat(self.funding.get_value_to_self_msat() / 1000);
11028
+ let post_channel_balance = AddSigned::checked_add_signed(
11029
+ their_channel_balance.to_sat(),
11030
+ their_funding_contribution.to_sat(),
11031
+ );
11032
+
11033
+ if post_channel_balance.is_none() {
11034
+ return Err(ChannelError::WarnAndDisconnect(format!(
11035
+ "Channel {} cannot be spliced out; their {} contribution exhausts their channel balance: {}",
11036
+ self.context.channel_id(),
11037
+ their_funding_contribution,
11038
+ their_channel_balance,
11039
+ )));
11040
+ }
11041
+
11026
11042
let splice_funding = FundingScope::for_splice(
11027
11043
&self.funding,
11028
11044
&self.context,
You can’t perform that action at this time.
0 commit comments