Fix bug in early-HTLC-fulfill handling
[rust-lightning] / fuzz / fuzz_targets / msg_targets / msg_funding_created_target.rs
index 2420e921ecff8775ac9a93f0bcd298bfd0d306eb..45c7c408ecc7671195f2d4d43918392e2c0b6797 100644 (file)
@@ -9,15 +9,11 @@ use lightning::util::reset_rng_state;
 use lightning::ln::msgs::{MsgEncodable, MsgDecodable};
 
 mod utils;
-use utils::slice_to_be16;
 
 #[inline]
 pub fn do_test(data: &[u8]) {
        reset_rng_state();
-       let mut read_pos = 0;
-       loop {
-               test_msg!(msgs::FundingCreated, data, read_pos);
-       }
+       test_msg!(msgs::FundingCreated, data);
 }
 
 #[cfg(feature = "afl")]
@@ -40,13 +36,11 @@ fn main() {
        }
 }
 
+extern crate hex;
 #[cfg(test)]
 mod tests {
-       use utils::extend_vec_from_hex;
        #[test]
        fn duplicate_crash() {
-               let mut a = Vec::new();
-               extend_vec_from_hex("00", &mut a);
-               super::do_test(&a);
+               super::do_test(&::hex::decode("00").unwrap());
        }
 }