Skip to content

Commit 77e5aa7

Browse files
committed
F phantom invoice hints filtering
1 parent ff2966d commit 77e5aa7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lightning-invoice/src/utils.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,17 @@ pub fn create_phantom_invoice<Signer: Sign, K: Deref>(
6464
}
6565

6666
for hint in phantom_route_hints {
67-
let (mut route_hints, has_private_channels) = filter_channels(
67+
let mut route_hints = filter_channels(
6868
hint.channels.clone(),
6969
amt_msat
7070
);
7171

72-
// If we have any private channels, the route hints from `filter_channels` will be empty.
72+
// If we have a mix of public and private channels, the route hints from `filter_channels`
73+
// will be empty.
7374
// In that case we create a RouteHint on which we will push a single hop with the phantom
7475
// route into the invoice, and let the sender find the path to the `hint.real_node_pubkey`
7576
// node by looking at our public channels.
76-
if has_private_channels && route_hints.is_empty(){
77+
if route_hints.is_empty(){
7778
route_hints.push(RouteHint(vec![]))
7879
}
7980
for mut route_hint in route_hints {

0 commit comments

Comments
 (0)