Replace `send_htlc` amount checking with available balances
[rust-lightning] / lightning / src / ln / payment_tests.rs
index 9e044d1c92d686479d6f76187001ac75c55d92aa..5efd1cb9148a7a8567d224e43c490efc97441a87 100644 (file)
@@ -2167,12 +2167,11 @@ fn retry_multi_path_single_failed_payment() {
        assert_eq!(events.len(), 1);
        match events[0] {
                Event::PaymentPathFailed { payment_hash: ev_payment_hash, payment_failed_permanently: false,
-                       failure: PathFailure::InitialSend { err: APIError::ChannelUnavailable { err: ref err_msg }},
+                       failure: PathFailure::InitialSend { err: APIError::ChannelUnavailable { .. }},
                        short_channel_id: Some(expected_scid), .. } =>
                {
                        assert_eq!(payment_hash, ev_payment_hash);
                        assert_eq!(expected_scid, route.paths[1].hops[0].short_channel_id);
-                       assert!(err_msg.contains("max HTLC"));
                },
                _ => panic!("Unexpected event"),
        }
@@ -2242,12 +2241,11 @@ fn immediate_retry_on_failure() {
        assert_eq!(events.len(), 1);
        match events[0] {
                Event::PaymentPathFailed { payment_hash: ev_payment_hash, payment_failed_permanently: false,
-                       failure: PathFailure::InitialSend { err: APIError::ChannelUnavailable { err: ref err_msg }},
+                       failure: PathFailure::InitialSend { err: APIError::ChannelUnavailable { .. }},
                        short_channel_id: Some(expected_scid), .. } =>
                {
                        assert_eq!(payment_hash, ev_payment_hash);
                        assert_eq!(expected_scid, route.paths[1].hops[0].short_channel_id);
-                       assert!(err_msg.contains("max HTLC"));
                },
                _ => panic!("Unexpected event"),
        }