Merge pull request #1009 from ariard/2021-07-add-forward-dust-limit
[rust-lightning] / fuzz / src / chanmon_consistency.rs
index 17230a83500c383f2da5f10a963088f56008858e..4ce0df09286bf76351c74391477f19980de96d78 100644 (file)
@@ -247,12 +247,14 @@ fn check_api_err(api_err: APIError) {
                                _ if err.starts_with("Cannot send value that would put counterparty balance under holder-announced channel reserve value") => {},
                                _ if err.starts_with("Cannot send value that would overdraw remaining funds.") => {},
                                _ if err.starts_with("Cannot send value that would not leave enough to pay for fees.") => {},
+                               _ if err.starts_with("Cannot send value that would put our exposure to dust HTLCs at") => {},
                                _ => panic!("{}", err),
                        }
                },
                APIError::MonitorUpdateFailed => {
                        // We can (obviously) temp-fail a monitor update
                },
+               APIError::IncompatibleShutdownScript { .. } => panic!("Cannot send an incompatible shutdown script"),
        }
 }
 #[inline]
@@ -396,6 +398,9 @@ pub fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
        let mut channel_txn = Vec::new();
        macro_rules! make_channel {
                ($source: expr, $dest: expr, $chan_id: expr) => { {
+                       $source.peer_connected(&$dest.get_our_node_id(), &Init { features: InitFeatures::known() });
+                       $dest.peer_connected(&$source.get_our_node_id(), &Init { features: InitFeatures::known() });
+
                        $source.create_channel($dest.get_our_node_id(), 100_000, 42, 0, None).unwrap();
                        let open_channel = {
                                let events = $source.get_and_clear_pending_msg_events();