+// This file is Copyright its original authors, visible in version control
+// history.
+//
+// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
+// or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
+// You may not use this file except in accordance with one or both of these
+// licenses.
+
//! A bunch of useful utilities for building networks of nodes and exchanging messages between
//! nodes for functional tests.
}
let (_, our_payment_hash) = get_payment_preimage_hash!(origin_node);
- unwrap_send_err!(origin_node.node.send_payment(&route, our_payment_hash, &None), true, APIError::ChannelUnavailable { err },
- assert_eq!(err, "Cannot send value that would put us over the max HTLC value in flight our peer will accept"));
+ unwrap_send_err!(origin_node.node.send_payment(&route, our_payment_hash, &None), true, APIError::ChannelUnavailable { ref err },
+ assert!(err.contains("Cannot send value that would put us over the max HTLC value in flight our peer will accept")));
}
pub fn send_payment<'a, 'b, 'c>(origin: &Node<'a, 'b, 'c>, expected_route: &[&Node<'a, 'b, 'c>], recv_value: u64, expected_value: u64) {