Skip to content

Commit beff815

Browse files
committed
f - use get_value_to_self_msat
1 parent a37d873 commit beff815

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
@@ -10674,10 +10674,9 @@ where
1067410674
if our_funding_contribution < SignedAmount::ZERO {
1067510675
// TODO(splicing): Check that channel balance does not go below the channel reserve
1067610676
let post_channel_value = AddSigned::checked_add_signed(
10677-
self.funding.get_value_satoshis(),
10677+
self.funding.get_value_to_self_msat() / 1000,
1067810678
our_funding_contribution.to_sat(),
1067910679
);
10680-
// FIXME: Should we check value_to_self instead? Do HTLCs need to be accounted for?
1068110680
// FIXME: Check that we can pay for the outputs from the channel value?
1068210681
if post_channel_value.is_none() {
1068310682
return Err(APIError::APIMisuseError {

0 commit comments

Comments
 (0)