Skip to content

Commit d9f10e4

Browse files
committed
f - use get_value_to_self_msat
1 parent b68efb9 commit d9f10e4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning/src/ln/channel.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10682,10 +10682,9 @@ where
1068210682
if our_funding_contribution < SignedAmount::ZERO {
1068310683
// TODO(splicing): Check that channel balance does not go below the channel reserve
1068410684
let post_channel_value = AddSigned::checked_add_signed(
10685-
self.funding.get_value_satoshis(),
10685+
self.funding.get_value_to_self_msat() / 1000,
1068610686
our_funding_contribution.to_sat(),
1068710687
);
10688-
// FIXME: Should we check value_to_self instead? Do HTLCs need to be accounted for?
1068910688
// FIXME: Check that we can pay for the outputs from the channel value?
1069010689
if post_channel_value.is_none() {
1069110690
return Err(APIError::APIMisuseError {

0 commit comments

Comments
 (0)