]> git.bitcoin.ninja Git - rust-lightning/blobdiff - lightning/src/ln/functional_test_utils.rs
Expose payment metadata in the sending path via `send_payment`.
[rust-lightning] / lightning / src / ln / functional_test_utils.rs
index 5ec16f90fc9bbba19bebb59e25f6621cbab2a84f..ca93be6ac464897c6720a62ff45335f5c4552947 100644 (file)
@@ -1347,7 +1347,7 @@ macro_rules! expect_payment_failed_conditions {
 }
 
 pub fn send_along_route_with_secret<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, route: Route, expected_paths: &[&[&Node<'a, 'b, 'c>]], recv_value: u64, our_payment_hash: PaymentHash, our_payment_secret: PaymentSecret) -> PaymentId {
-       let payment_id = origin_node.node.send_payment(&route, our_payment_hash, &Some(our_payment_secret)).unwrap();
+       let payment_id = origin_node.node.send_payment(&route, our_payment_hash, &Some(our_payment_secret), None).unwrap();
        check_added_monitors!(origin_node, expected_paths.len());
        pass_along_route(origin_node, expected_paths, recv_value, our_payment_hash, our_payment_secret);
        payment_id
@@ -1562,7 +1562,7 @@ pub fn route_over_limit<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_rou
        }
 
        let (_, our_payment_hash, our_payment_preimage) = get_payment_preimage_hash!(expected_route.last().unwrap());
-       unwrap_send_err!(origin_node.node.send_payment(&route, our_payment_hash, &Some(our_payment_preimage)), true, APIError::ChannelUnavailable { ref err },
+       unwrap_send_err!(origin_node.node.send_payment(&route, our_payment_hash, &Some(our_payment_preimage), None), true, APIError::ChannelUnavailable { ref err },
                assert!(err.contains("Cannot send value that would put us over the max HTLC value in flight our peer will accept")));
 }