match events[0] {
MessageSendEvent::HandleError { action: ErrorAction::SendErrorMessage { ref msg }, node_id } => {
assert_eq!(node_id, nodes[0].node.get_our_node_id());
- assert!(regex::Regex::new(r"Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: (\([A-Fa-f0-9]+\))").unwrap().is_match(&*msg.data));
+ assert_eq!(msg.data, "Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format: Script(OP_PUSHNUM_16 OP_PUSHBYTES_2 0028)");
},
_ => panic!("Unexpected event"),
}
match events[0] {
MessageSendEvent::HandleError { action: ErrorAction::SendErrorMessage { ref msg }, node_id } => {
assert_eq!(node_id, nodes[1].node.get_our_node_id());
- assert!(regex::Regex::new(r"Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: (\([A-Fa-f0-9]+\))").unwrap().is_match(&*msg.data));
+ assert_eq!(msg.data, "Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format: Script(OP_PUSHNUM_16 OP_PUSHBYTES_2 0028)");
},
_ => panic!("Unexpected event"),
}
match events[0] {
MessageSendEvent::HandleError { action: ErrorAction::SendErrorMessage { ref msg }, node_id } => {
assert_eq!(node_id, nodes[0].node.get_our_node_id());
- assert!(regex::Regex::new(r"Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format. script: (\([A-Fa-f0-9]+\))").unwrap().is_match(&*msg.data));
+ assert_eq!(msg.data, "Peer is signaling upfront_shutdown but has provided a non-accepted scriptpubkey format: Script(OP_0 OP_PUSHBYTES_2 0000)");
},
_ => panic!("Unexpected event"),
}
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
// We test config.our_to_self > BREAKDOWN_TIMEOUT is enforced in Channel::new_outbound()
- if let Err(error) = Channel::new_outbound(&&test_utils::TestFeeEstimator { sat_per_kw: Mutex::new(253) }, &nodes[0].keys_manager, nodes[1].node.get_our_node_id(), 1000000, 1000000, 0, &low_our_to_self_config) {
+ if let Err(error) = Channel::new_outbound(&&test_utils::TestFeeEstimator { sat_per_kw: Mutex::new(253) }, &nodes[0].keys_manager, nodes[1].node.get_our_node_id(), InitFeatures::known(), 1000000, 1000000, 0, &low_our_to_self_config) {
match error {
APIError::APIMisuseError { err } => { assert!(regex::Regex::new(r"Configured with an unreasonable our_to_self_delay \(\d+\) putting user funds at risks").unwrap().is_match(err.as_str())); },
_ => panic!("Unexpected event"),