File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -439,8 +439,10 @@ fn filter_channels(channels: Vec<ChannelDetails>, min_inbound_capacity_msat: Opt
439439 // the payment value and where we're currently connected to the channel counterparty.
440440 // Even if we cannot satisfy both goals, always ensure we include *some* hints, preferring
441441 // those which meet at least one criteria.
442- filtered_channels. into_iter ( )
443- . filter ( |( _counterparty_id, channel) | {
442+ filtered_channels
443+ . into_iter ( )
444+ . map ( |( _, channel) | channel)
445+ . filter ( |channel| {
444446 if online_min_capacity_channel_exists {
445447 channel. inbound_capacity_msat >= min_inbound_capacity && channel. is_usable
446448 } else if min_capacity_channel_exists && online_channel_exists {
@@ -454,7 +456,7 @@ fn filter_channels(channels: Vec<ChannelDetails>, min_inbound_capacity_msat: Opt
454456 channel. is_usable
455457 } else { true }
456458 } )
457- . map ( | ( _counterparty_id , channel ) | route_hint_from_channel ( channel ) )
459+ . map ( route_hint_from_channel)
458460 . collect :: < Vec < RouteHint > > ( )
459461}
460462
You can’t perform that action at this time.
0 commit comments