File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -1157,7 +1157,8 @@ where
11571157 }
11581158 }
11591159
1160- let anchor_channel = channel_type. requires_anchors_zero_fee_htlc_tx ( ) ;
1160+ let anchor_channel = channel_type. requires_anchors_zero_fee_htlc_tx ( )
1161+ || channel_type. requires_anchor_zero_fee_commitments ( ) ;
11611162 if anchor_channel {
11621163 if let Some ( anchor_channels_config) =
11631164 self . config . anchor_channels_config . as_ref ( )
Original file line number Diff line number Diff line change @@ -1148,11 +1148,11 @@ impl Node {
11481148 . peer_by_node_id ( peer_node_id)
11491149 . ok_or ( Error :: ConnectionFailed ) ?
11501150 . init_features ;
1151+ let anchor_channel = init_features. requires_anchors_zero_fee_htlc_tx ( )
1152+ || init_features. requires_anchor_zero_fee_commitments ( ) ;
11511153 let required_funds_sats = amount_sats
11521154 + self . config . anchor_channels_config . as_ref ( ) . map_or ( 0 , |c| {
1153- if init_features. requires_anchors_zero_fee_htlc_tx ( )
1154- && !c. trusted_peers_no_reserve . contains ( peer_node_id)
1155- {
1155+ if anchor_channel && !c. trusted_peers_no_reserve . contains ( peer_node_id) {
11561156 c. per_channel_reserve_sats
11571157 } else {
11581158 0
@@ -1827,9 +1827,10 @@ pub(crate) fn total_anchor_channels_reserve_sats(
18271827 !anchor_channels_config. trusted_peers_no_reserve . contains ( & c. counterparty . node_id )
18281828 && c. channel_shutdown_state
18291829 . map_or ( true , |s| s != ChannelShutdownState :: ShutdownComplete )
1830- && c. channel_type
1831- . as_ref ( )
1832- . map_or ( false , |t| t. requires_anchors_zero_fee_htlc_tx ( ) )
1830+ && c. channel_type . as_ref ( ) . map_or ( false , |t| {
1831+ t. requires_anchors_zero_fee_htlc_tx ( )
1832+ || t. requires_anchor_zero_fee_commitments ( )
1833+ } )
18331834 } )
18341835 . count ( ) as u64
18351836 * anchor_channels_config. per_channel_reserve_sats
Original file line number Diff line number Diff line change @@ -747,9 +747,11 @@ where
747747 total_anchor_channels_reserve_sats ( & self . channel_manager , & self . config ) ;
748748 let spendable_amount_sats =
749749 self . wallet . get_spendable_amount_sats ( cur_anchor_reserve_sats) . unwrap_or ( 0 ) ;
750+ let anchor_channel = init_features. requires_anchors_zero_fee_htlc_tx ( )
751+ || init_features. requires_anchor_zero_fee_commitments ( ) ;
750752 let required_funds_sats = channel_amount_sats
751753 + self . config . anchor_channels_config . as_ref ( ) . map_or ( 0 , |c| {
752- if init_features . requires_anchors_zero_fee_htlc_tx ( )
754+ if anchor_channel
753755 && !c. trusted_peers_no_reserve . contains ( & their_network_key)
754756 {
755757 c. per_channel_reserve_sats
You can’t perform that action at this time.
0 commit comments