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
In order to make the scoring tests easier to read, only check the
relevant RouteHop fields. The remaining fields are tested elsewhere.
Expand the test to show the path used without scoring.
let path = route.paths[0].iter().map(|hop| hop.short_channel_id).collect::<Vec<_>>();
4361
+
4362
+
assert_eq!(route.get_total_fees(),100);
4363
+
assert_eq!(route.get_total_amount(),100);
4364
+
assert_eq!(path, vec![2,4,6,11,8]);
4365
+
4354
4366
// Applying a 100 msat penalty to each hop results in taking channels 7 and 10 to nodes[6]
4355
4367
// from nodes[2] rather than channel 6, 11, and 8, even though the longer path is cheaper.
4356
4368
let scorer = Scorer::new(100);
4357
-
let route = get_route(&our_id,&net_graph_msg_handler.network_graph,&nodes[6],None,None,&last_hops(&nodes).iter().collect::<Vec<_>>(),100,42,Arc::clone(&logger),&scorer).unwrap();
0 commit comments