X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Fln%2Ffunctional_test_utils.rs;h=03fa562555e362f168f8aa82044bd32c88544d31;hb=5e595bbd3cf6c3acf4873738f2034cce0d0d935a;hp=13fe7f73c31f02f0b78515371405e600560a64fb;hpb=1b99c93334c092f6fb7224729649316a23b46373;p=rust-lightning diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs index 13fe7f73..03fa5625 100644 --- a/lightning/src/ln/functional_test_utils.rs +++ b/lightning/src/ln/functional_test_utils.rs @@ -1015,7 +1015,7 @@ macro_rules! get_route_and_payment_hash { .with_features($crate::ln::features::InvoiceFeatures::known()) .with_route_hints($last_hops); let net_graph_msg_handler = &$send_node.net_graph_msg_handler; - let scorer = ::routing::scorer::Scorer::new(0); + let scorer = ::routing::scorer::Scorer::with_fixed_penalty(0); let route = ::routing::router::get_route( &$send_node.node.get_our_node_id(), &payee, &net_graph_msg_handler.network_graph, Some(&$send_node.node.list_usable_channels().iter().collect::>()), @@ -1085,7 +1085,7 @@ macro_rules! expect_payment_sent { let expected_payment_hash = PaymentHash(Sha256::hash(&$expected_payment_preimage.0).into_inner()); assert_eq!(events.len(), 1); match events[0] { - Event::PaymentSent { ref payment_preimage, ref payment_hash } => { + Event::PaymentSent { payment_id: _, ref payment_preimage, ref payment_hash } => { assert_eq!($expected_payment_preimage, *payment_preimage); assert_eq!(expected_payment_hash, *payment_hash); }, @@ -1339,7 +1339,7 @@ pub fn route_payment<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_route: let payee = Payee::new(expected_route.last().unwrap().node.get_our_node_id()) .with_features(InvoiceFeatures::known()); let net_graph_msg_handler = &origin_node.net_graph_msg_handler; - let scorer = Scorer::new(0); + let scorer = Scorer::with_fixed_penalty(0); let route = get_route( &origin_node.node.get_our_node_id(), &payee, &net_graph_msg_handler.network_graph, Some(&origin_node.node.list_usable_channels().iter().collect::>()), @@ -1358,7 +1358,7 @@ pub fn route_over_limit<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_rou let payee = Payee::new(expected_route.last().unwrap().node.get_our_node_id()) .with_features(InvoiceFeatures::known()); let net_graph_msg_handler = &origin_node.net_graph_msg_handler; - let scorer = Scorer::new(0); + let scorer = Scorer::with_fixed_penalty(0); let route = get_route(&origin_node.node.get_our_node_id(), &payee, &net_graph_msg_handler.network_graph, None, recv_value, TEST_FINAL_CLTV, origin_node.logger, &scorer).unwrap(); assert_eq!(route.paths.len(), 1); assert_eq!(route.paths[0].len(), expected_route.len());