Document exactly our CLTV sanitization policy for incoming HTLCs
[rust-lightning] / fuzz / src / router.rs
index fbb629220112a63f543135c1be2537908c6ad017..b1a766ba79149b5640a080c55a625eb338424a03 100644 (file)
@@ -118,13 +118,12 @@ pub fn do_test(data: &[u8]) {
        macro_rules! decode_msg {
                ($MsgType: path, $len: expr) => {{
                        let mut reader = ::std::io::Cursor::new(get_slice!($len));
-                       match <($MsgType)>::read(&mut reader) {
+                       match <$MsgType>::read(&mut reader) {
                                Ok(msg) => msg,
                                Err(e) => match e {
                                        msgs::DecodeError::UnknownVersion => return,
                                        msgs::DecodeError::UnknownRequiredFeature => return,
                                        msgs::DecodeError::InvalidValue => return,
-                                       msgs::DecodeError::ExtraAddressesPerType => return,
                                        msgs::DecodeError::BadLengthDescriptor => return,
                                        msgs::DecodeError::ShortRead => panic!("We picked the length..."),
                                        msgs::DecodeError::Io(e) => panic!(format!("{}", e)),
@@ -237,11 +236,3 @@ pub fn do_test(data: &[u8]) {
 pub extern "C" fn router_run(data: *const u8, datalen: usize) {
        do_test(unsafe { std::slice::from_raw_parts(data, datalen) });
 }
-
-#[cfg(test)]
-mod tests {
-       #[test]
-       fn duplicate_crash() {
-               super::do_test(&::hex::decode("00").unwrap());
-       }
-}