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 @@ -11014,6 +11014,22 @@ where
11014
11014
)));
11015
11015
}
11016
11016
11017
+ let their_channel_balance = Amount::from_sat(self.funding.get_value_satoshis())
11018
+ - Amount::from_sat(self.funding.get_value_to_self_msat() / 1000);
11019
+ let post_channel_balance = AddSigned::checked_add_signed(
11020
+ their_channel_balance.to_sat(),
11021
+ their_funding_contribution.to_sat(),
11022
+ );
11023
+
11024
+ if post_channel_balance.is_none() {
11025
+ return Err(ChannelError::WarnAndDisconnect(format!(
11026
+ "Channel {} cannot be spliced out; their {} contribution exhausts their channel balance: {}",
11027
+ self.context.channel_id(),
11028
+ their_funding_contribution,
11029
+ their_channel_balance,
11030
+ )));
11031
+ }
11032
+
11017
11033
let splice_funding = FundingScope::for_splice(
11018
11034
&self.funding,
11019
11035
&self.context,
You can’t perform that action at this time.
0 commit comments