From 7858010dfc2b9e5095ec10de4c66c719f826dac3 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Thu, 1 Dec 2022 00:13:53 -0500 Subject: [PATCH] Test for unknown HTLC intercept id error --- lightning/src/ln/payment_tests.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lightning/src/ln/payment_tests.rs b/lightning/src/ln/payment_tests.rs index 95bfae58b..034913ba9 100644 --- a/lightning/src/ln/payment_tests.rs +++ b/lightning/src/ln/payment_tests.rs @@ -1562,5 +1562,7 @@ fn do_test_intercepted_payment(test: InterceptTest) { let (_, channel_id) = open_zero_conf_channel(&nodes[1], &nodes[2], None); let unknown_intercept_id_err = nodes[1].node.forward_intercepted_htlc(intercept_id, &channel_id, nodes[2].node.get_our_node_id(), expected_outbound_amount_msat).unwrap_err(); assert_eq!(unknown_intercept_id_err , APIError::APIMisuseError { err: format!("Payment with intercept id {} not found", log_bytes!(intercept_id.0)) }); + let unknown_intercept_id_err = nodes[1].node.fail_intercepted_htlc(intercept_id).unwrap_err(); + assert_eq!(unknown_intercept_id_err , APIError::APIMisuseError { err: format!("Payment with intercept id {} not found", log_bytes!(intercept_id.0)) }); } } -- 2.39.5