Switch Sha256 to using bitcoin_hashes and our own HKDF
[rust-lightning] / fuzz / fuzz_targets / router_target.rs
index 4ccd32746e39a2b87a247a9581808ade4eb74459..f7b373cdbc97683057a26df8cd20efc284b0300e 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)),
                                }
                        }
@@ -190,7 +187,7 @@ pub fn do_test(data: &[u8]) {
                                        },
                                        1 => {
                                                let short_channel_id = slice_to_be64(get_slice!(8));
-                                               router.handle_htlc_fail_channel_update(&msgs::HTLCFailChannelUpdate::ChannelClosed {short_channel_id});
+                                               router.handle_htlc_fail_channel_update(&msgs::HTLCFailChannelUpdate::ChannelClosed {short_channel_id, is_permanent: false});
                                        },
                                        _ => return,
                                }