Make rand a dev-dep by having the user randomize HTLC forward delay
[rust-lightning] / fuzz / fuzz_targets / msg_targets / msg_closing_signed_target.rs
index 7c87970ae7c81e3035116fdc3d56755794d7d950..faeeae3eb9870bb0165cb8795c83407e462101d1 100644 (file)
@@ -4,24 +4,21 @@
 extern crate lightning;
 
 use lightning::ln::msgs;
-use lightning::util::reset_rng_state;
-
-use lightning::ln::msgs::{MsgEncodable, MsgDecodable};
 
 mod utils;
+use utils::VecWriter;
 
 #[inline]
 pub fn do_test(data: &[u8]) {
-       reset_rng_state();
        test_msg!(msgs::ClosingSigned, data);
 }
 
 #[cfg(feature = "afl")]
-extern crate afl;
+#[macro_use] extern crate afl;
 #[cfg(feature = "afl")]
 fn main() {
-       afl::read_stdio_bytes(|data| {
-               do_test(&data);
+       fuzz!(|data| {
+               do_test(data);
        });
 }