Merge pull request #558 from TheBlueMatt/2020-03-555-nits
[rust-lightning] / lightning / src / ln / functional_test_utils.rs
index f1fc764965c5357151a151b67a6e404e9ca4292b..cf0dc1832d8598c3a2220d9856cfc4a8326abaf8 100644 (file)
@@ -264,7 +264,7 @@ macro_rules! get_local_commitment_txn {
                        let mut commitment_txn = None;
                        for (funding_txo, monitor) in monitors.iter_mut() {
                                if funding_txo.to_channel_id() == $channel_id {
-                                       commitment_txn = Some(monitor.get_latest_local_commitment_txn());
+                                       commitment_txn = Some(monitor.unsafe_get_latest_local_commitment_txn());
                                        break;
                                }
                        }
@@ -777,7 +777,7 @@ macro_rules! expect_payment_failed {
 }
 
 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: Option<PaymentSecret>) {
-       origin_node.node.send_payment(route, our_payment_hash, &our_payment_secret).unwrap();
+       origin_node.node.send_payment(&route, our_payment_hash, &our_payment_secret).unwrap();
        check_added_monitors!(origin_node, expected_paths.len());
 
        let mut events = origin_node.node.get_and_clear_pending_msg_events();
@@ -953,7 +953,7 @@ pub fn route_over_limit<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_rou
        }
 
        let (_, our_payment_hash) = get_payment_preimage_hash!(origin_node);
-       unwrap_send_err!(origin_node.node.send_payment(route, our_payment_hash, &None), true, APIError::ChannelUnavailable { err },
+       unwrap_send_err!(origin_node.node.send_payment(&route, our_payment_hash, &None), true, APIError::ChannelUnavailable { err },
                assert_eq!(err, "Cannot send value that would put us over the max HTLC value in flight our peer will accept"));
 }