1 // This file is auto-generated by gen_target.sh based on msg_target_template.txt
2 // To modify it, modify msg_target_template.txt and run gen_target.sh instead.
4 extern crate lightning;
6 use lightning::ln::channelmonitor;
7 use lightning::util::reset_rng_state;
10 pub fn do_test(data: &[u8]) {
12 if let Some(monitor) = channelmonitor::ChannelMonitor::deserialize(data) {
13 assert!(channelmonitor::ChannelMonitor::deserialize(&monitor.serialize_for_disk()[..]).unwrap() == monitor);
14 monitor.serialize_for_watchtower();
18 #[cfg(feature = "afl")]
20 #[cfg(feature = "afl")]
22 afl::read_stdio_bytes(|data| {
27 #[cfg(feature = "honggfuzz")]
28 #[macro_use] extern crate honggfuzz;
29 #[cfg(feature = "honggfuzz")]
43 fn duplicate_crash() {
44 super::do_test(&::hex::decode("00").unwrap());