X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Ffunctional_test_utils.rs;h=b0ec079479a2f3afc71ea95e7bc767cfdea0239d;hb=70f7db981099ef3a7aad14ca1987106b2f07c014;hp=b7d7011c93341e9b779fdbf4c4734db90e300caf;hpb=457e48e1025aced95ccca65d9ca78ec6b0a4ed61;p=rust-lightning diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs index b7d7011c..b0ec0794 100644 --- a/lightning/src/ln/functional_test_utils.rs +++ b/lightning/src/ln/functional_test_utils.rs @@ -1085,7 +1085,7 @@ macro_rules! get_route_and_payment_hash { let payment_params = $crate::routing::router::PaymentParameters::from_node_id($recv_node.node.get_our_node_id()) .with_features($crate::ln::features::InvoiceFeatures::known()) .with_route_hints($last_hops); - let scorer = $crate::util::test_utils::TestScorer::with_fixed_penalty(0); + let scorer = $crate::util::test_utils::TestScorer::with_penalty(0); let route = $crate::routing::router::get_route( &$send_node.node.get_our_node_id(), &payment_params, $send_node.network_graph, Some(&$send_node.node.list_usable_channels().iter().collect::>()), @@ -1137,7 +1137,7 @@ macro_rules! expect_pending_htlcs_forwardable_from_events { }} } -#[cfg(any(test, feature = "unstable"))] +#[cfg(any(test, feature = "_bench_unstable"))] macro_rules! expect_payment_received { ($node: expr, $expected_payment_hash: expr, $expected_payment_secret: expr, $expected_recv_value: expr) => { let events = $node.node.get_and_clear_pending_events(); @@ -1540,7 +1540,7 @@ pub const TEST_FINAL_CLTV: u32 = 70; pub fn route_payment<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_route: &[&Node<'a, 'b, 'c>], recv_value: u64) -> (PaymentPreimage, PaymentHash, PaymentSecret) { let payment_params = PaymentParameters::from_node_id(expected_route.last().unwrap().node.get_our_node_id()) .with_features(InvoiceFeatures::known()); - let scorer = test_utils::TestScorer::with_fixed_penalty(0); + let scorer = test_utils::TestScorer::with_penalty(0); let route = get_route( &origin_node.node.get_our_node_id(), &payment_params, &origin_node.network_graph, Some(&origin_node.node.list_usable_channels().iter().collect::>()), @@ -1558,7 +1558,7 @@ pub fn route_payment<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_route: pub fn route_over_limit<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_route: &[&Node<'a, 'b, 'c>], recv_value: u64) { let payment_params = PaymentParameters::from_node_id(expected_route.last().unwrap().node.get_our_node_id()) .with_features(InvoiceFeatures::known()); - let scorer = test_utils::TestScorer::with_fixed_penalty(0); + let scorer = test_utils::TestScorer::with_penalty(0); let route = get_route( &origin_node.node.get_our_node_id(), &payment_params, origin_node.network_graph, None, recv_value, TEST_FINAL_CLTV, origin_node.logger, &scorer).unwrap();