Clarify policy applied in send htlc error msgs
[rust-lightning] / src / ln / functional_test_utils.rs
index 03f265a70526a402e0ac409e9936821351ebc3fd..36a9098732f8604889a97b992827fda1834fa86a 100644 (file)
@@ -702,7 +702,7 @@ pub fn route_over_limit(origin_node: &Node, expected_route: &[&Node], recv_value
 
        let err = origin_node.node.send_payment(route, our_payment_hash).err().unwrap();
        match err {
-               APIError::ChannelUnavailable{err} => assert_eq!(err, "Cannot send value that would put us over our max HTLC value in flight"),
+               APIError::ChannelUnavailable{err} => assert_eq!(err, "Cannot send value that would put us over the max HTLC value in flight our peer will accept"),
                _ => panic!("Unknown error variants"),
        };
 }
@@ -713,7 +713,7 @@ pub fn send_payment(origin: &Node, expected_route: &[&Node], recv_value: u64) {
 }
 
 pub fn fail_payment_along_route(origin_node: &Node, expected_route: &[&Node], skip_last: bool, our_payment_hash: PaymentHash) {
-       assert!(expected_route.last().unwrap().node.fail_htlc_backwards(&our_payment_hash, 0));
+       assert!(expected_route.last().unwrap().node.fail_htlc_backwards(&our_payment_hash));
        expect_pending_htlcs_forwardable!(expected_route.last().unwrap());
        check_added_monitors!(expected_route.last().unwrap(), 1);
 
@@ -1084,7 +1084,7 @@ pub fn reconnect_nodes(node_a: &Node, node_b: &Node, send_funding_locked: (bool,
                check_added_monitors!(node_a, 0);
        }
 
-       // We dont yet support both needing updates, as that would require a different commitment dance:
+       // We don't yet support both needing updates, as that would require a different commitment dance:
        assert!((pending_htlc_adds.0 == 0 && pending_htlc_claims.0 == 0 && pending_cell_htlc_claims.0 == 0 && pending_cell_htlc_fails.0 == 0) ||
                        (pending_htlc_adds.1 == 0 && pending_htlc_claims.1 == 0 && pending_cell_htlc_claims.1 == 0 && pending_cell_htlc_fails.1 == 0));