In
26c1639ab69d6780c97a118f09e42cb42304088a we switched to using
`Default::default()` to initialize `()` for scoring parameters in
tests. A number of `()`s slipped back in recently, which we replace
here.
let route_params = RouteParameters::from_payment_params_and_value(payment_params, amt_msat);
let route = get_route(
&nodes[0].node.get_our_node_id(), &route_params, &nodes[0].network_graph.read_only(), None,
let route_params = RouteParameters::from_payment_params_and_value(payment_params, amt_msat);
let route = get_route(
&nodes[0].node.get_our_node_id(), &route_params, &nodes[0].network_graph.read_only(), None,
- nodes[0].logger, &scorer, &(), &random_seed_bytes
+ nodes[0].logger, &scorer, &Default::default(), &random_seed_bytes
).unwrap();
let (payment_hash, payment_secret) = nodes[2].node.create_inbound_payment(Some(amt_msat), 60 * 60, None).unwrap();
).unwrap();
let (payment_hash, payment_secret) = nodes[2].node.create_inbound_payment(Some(amt_msat), 60 * 60, None).unwrap();
max_total_routing_fee_msat: Some(149_999) };
if let Err(LightningError{err, action: ErrorAction::IgnoreError}) = get_route(
&our_id, &route_params, &network_graph.read_only(), None, Arc::clone(&logger),
max_total_routing_fee_msat: Some(149_999) };
if let Err(LightningError{err, action: ErrorAction::IgnoreError}) = get_route(
&our_id, &route_params, &network_graph.read_only(), None, Arc::clone(&logger),
- &scorer, &(), &random_seed_bytes) {
+ &scorer, &Default::default(), &random_seed_bytes) {
assert_eq!(err, "Failed to find a sufficient route to the given destination");
} else { panic!(); }
}
assert_eq!(err, "Failed to find a sufficient route to the given destination");
} else { panic!(); }
}
let route_params = RouteParameters::from_payment_params_and_value(
payment_params, amt_msat);
if let Err(LightningError { err, .. }) = get_route(
let route_params = RouteParameters::from_payment_params_and_value(
payment_params, amt_msat);
if let Err(LightningError { err, .. }) = get_route(
- &our_id, &route_params, &netgraph, None, Arc::clone(&logger), &scorer, &(), &random_seed_bytes
+ &our_id, &route_params, &netgraph, None, Arc::clone(&logger), &scorer, &Default::default(), &random_seed_bytes
) {
assert_eq!(err, "Failed to find a path to the given destination");
} else { panic!() }
) {
assert_eq!(err, "Failed to find a path to the given destination");
} else { panic!() }
let route_params = RouteParameters::from_payment_params_and_value(
payment_params, amt_msat);
if let Err(LightningError { err, .. }) = get_route(
let route_params = RouteParameters::from_payment_params_and_value(
payment_params, amt_msat);
if let Err(LightningError { err, .. }) = get_route(
- &our_id, &route_params, &netgraph, None, Arc::clone(&logger), &scorer, &(), &random_seed_bytes
+ &our_id, &route_params, &netgraph, None, Arc::clone(&logger), &scorer, &Default::default(), &random_seed_bytes
) {
assert_eq!(err, "Failed to find a path to the given destination");
} else { panic!() }
) {
assert_eq!(err, "Failed to find a path to the given destination");
} else { panic!() }
payment_params, amt_msat);
if let Err(LightningError { err, .. }) = get_route(
&our_id, &route_params, &netgraph, Some(&first_hops.iter().collect::<Vec<_>>()),
payment_params, amt_msat);
if let Err(LightningError { err, .. }) = get_route(
&our_id, &route_params, &netgraph, Some(&first_hops.iter().collect::<Vec<_>>()),
- Arc::clone(&logger), &scorer, &(), &random_seed_bytes
+ Arc::clone(&logger), &scorer, &Default::default(), &random_seed_bytes
) {
assert_eq!(err, "Failed to find a path to the given destination");
} else { panic!() }
) {
assert_eq!(err, "Failed to find a path to the given destination");
} else { panic!() }
let route = get_route(
&our_id, &route_params, &netgraph, Some(&first_hops.iter().collect::<Vec<_>>()),
let route = get_route(
&our_id, &route_params, &netgraph, Some(&first_hops.iter().collect::<Vec<_>>()),
- Arc::clone(&logger), &scorer, &(), &random_seed_bytes
+ Arc::clone(&logger), &scorer, &Default::default(), &random_seed_bytes
).unwrap();
assert_eq!(route.paths.len(), 1);
assert_eq!(route.get_total_amount(), amt_msat);
).unwrap();
assert_eq!(route.paths.len(), 1);
assert_eq!(route.get_total_amount(), amt_msat);