You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert_eq!(route.paths[0][4].node_features.le_flags(),&Vec::<u8>::new());// We dont pass flags in from invoices yet
1223
1227
assert_eq!(route.paths[0][4].channel_features.le_flags(),&Vec::<u8>::new());// We can't learn any flags from invoices, sadly
1224
1228
}
1229
+
1230
+
#[test]
1231
+
fnunannounced_path_test(){
1232
+
// We should be able to send a payment to a destination without any help of a routing graph
1233
+
// if we have a channel with a common counterparty that appears in the first and last hop
1234
+
// hints.
1235
+
let source_node_id = PublicKey::from_secret_key(&Secp256k1::new(),&SecretKey::from_slice(&hex::decode(format!("{:02}",41).repeat(32)).unwrap()[..]).unwrap());
1236
+
let middle_node_id = PublicKey::from_secret_key(&Secp256k1::new(),&SecretKey::from_slice(&hex::decode(format!("{:02}",42).repeat(32)).unwrap()[..]).unwrap());
1237
+
let target_node_id = PublicKey::from_secret_key(&Secp256k1::new(),&SecretKey::from_slice(&hex::decode(format!("{:02}",43).repeat(32)).unwrap()[..]).unwrap());
1238
+
1239
+
// If we specify a channel to a middle hop, that overrides our local channel view and that gets used
1240
+
let last_hops = vec![RouteHint{
1241
+
src_node_id: middle_node_id,
1242
+
short_channel_id:8,
1243
+
fees:RoutingFees{
1244
+
base_msat:1000,
1245
+
proportional_millionths:0,
1246
+
},
1247
+
cltv_expiry_delta:(8 << 8) | 1,
1248
+
htlc_minimum_msat:0,
1249
+
}];
1250
+
let our_chans = vec![channelmanager::ChannelDetails{
let route = get_route(&source_node_id,&NetworkGraph::new(),&target_node_id,Some(&our_chans.iter().collect::<Vec<_>>()),&last_hops.iter().collect::<Vec<_>>(),100,42,Arc::new(test_utils::TestLogger::new())).unwrap();
0 commit comments