]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Test for unknown HTLC intercept id error
authorValentine Wallace <vwallace@protonmail.com>
Thu, 1 Dec 2022 05:13:53 +0000 (00:13 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Thu, 1 Dec 2022 05:13:54 +0000 (00:13 -0500)
lightning/src/ln/payment_tests.rs

index 95bfae58be11223e3a6e73471f969c6b3cf99357..034913ba9308224e54e4e53ff34ac03891d474bb 100644 (file)
@@ -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)) });
        }
 }