Skip to content

Commit 396948e

Browse files
committed
f - use get_value_to_self_msat
1 parent 4dda5c3 commit 396948e

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
@@ -10680,10 +10680,9 @@ where
1068010680
if our_funding_contribution < SignedAmount::ZERO {
1068110681
// TODO(splicing): Check that channel balance does not go below the channel reserve
1068210682
let post_channel_value = AddSigned::checked_add_signed(
10683-
self.funding.get_value_satoshis(),
10683+
self.funding.get_value_to_self_msat() / 1000,
1068410684
our_funding_contribution.to_sat(),
1068510685
);
10686-
// FIXME: Should we check value_to_self instead? Do HTLCs need to be accounted for?
1068710686
// FIXME: Check that we can pay for the outputs from the channel value?
1068810687
if post_channel_value.is_none() {
1068910688
return Err(APIError::APIMisuseError {

0 commit comments

Comments
 (0)