Merge pull request #2655 from TheBlueMatt/2023-10-no-test-net
[rust-lightning] / lightning / src / ln / payment_tests.rs
index e48ae7bd8dcffeb54f165c958baaba9d9510ae5b..616a1d4ce00a3a429c64697100f109c144caa855 100644 (file)
@@ -1906,7 +1906,7 @@ fn do_test_intercepted_payment(test: InterceptTest) {
        // Check for unknown channel id error.
        let unknown_chan_id_err = nodes[1].node.forward_intercepted_htlc(intercept_id, &ChannelId::from_bytes([42; 32]), nodes[2].node.get_our_node_id(), expected_outbound_amount_msat).unwrap_err();
        assert_eq!(unknown_chan_id_err , APIError::ChannelUnavailable  {
-               err: format!("Channel with id {} not found for the passed counterparty node_id {}.",
+               err: format!("Channel with id {} not found for the passed counterparty node_id {}",
                        log_bytes!([42; 32]), nodes[2].node.get_our_node_id()) });
 
        if test == InterceptTest::Fail {
@@ -2736,9 +2736,7 @@ fn retry_multi_path_single_failed_payment() {
        let mut pay_params = route.route_params.clone().unwrap().payment_params;
        pay_params.previously_failed_channels.push(chans[1].short_channel_id.unwrap());
 
-       // Note that the second request here requests the amount we originally failed to send,
-       // not the amount remaining on the full payment, which should be changed.
-       let mut retry_params = RouteParameters::from_payment_params_and_value(pay_params, 100_000_001);
+       let mut retry_params = RouteParameters::from_payment_params_and_value(pay_params, 100_000_000);
        retry_params.max_total_routing_fee_msat = None;
        route.route_params.as_mut().unwrap().final_value_msat = 100_000_000;
        nodes[0].router.expect_find_route(retry_params, Ok(route.clone()));
@@ -3783,7 +3781,7 @@ fn test_retry_custom_tlvs() {
                payment_hash, Some(payment_secret), events.pop().unwrap(), true, None).unwrap();
        match payment_claimable {
                Event::PaymentClaimable { onion_fields, .. } => {
-                       assert_eq!(onion_fields.unwrap().custom_tlvs(), &custom_tlvs);
+                       assert_eq!(&onion_fields.unwrap().custom_tlvs()[..], &custom_tlvs[..]);
                },
                _ => panic!("Unexpected event"),
        };