Simplify DecodeError enum by removing some useless distinctions
[rust-lightning] / fuzz / fuzz_targets / router_target.rs
index 4ccd32746e39a2b87a247a9581808ade4eb74459..52f9a235fe731aa93bfa94b4ccaa913a53df41bf 100644 (file)
@@ -125,15 +125,12 @@ pub fn do_test(data: &[u8]) {
                        match <($MsgType)>::read(&mut reader) {
                                Ok(msg) => msg,
                                Err(e) => match e {
-                                       msgs::DecodeError::UnknownRealmByte => return,
+                                       msgs::DecodeError::UnknownVersion => return,
                                        msgs::DecodeError::UnknownRequiredFeature => return,
-                                       msgs::DecodeError::BadPublicKey => return,
-                                       msgs::DecodeError::BadSignature => return,
-                                       msgs::DecodeError::BadText => return,
+                                       msgs::DecodeError::InvalidValue => return,
                                        msgs::DecodeError::ExtraAddressesPerType => return,
                                        msgs::DecodeError::BadLengthDescriptor => return,
                                        msgs::DecodeError::ShortRead => panic!("We picked the length..."),
-                                       msgs::DecodeError::InvalidValue => panic!("Should not happen with p2p message decoding"),
                                        msgs::DecodeError::Io(e) => panic!(format!("{}", e)),
                                }
                        }