X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Fmsg_targets%2Fmsg_channel_update.rs;h=1cd9ddbbfe01e2532900e6dd24b70048518e3b6e;hb=eeabac8ccb6d9339228910145711bd5510bd0c4b;hp=aaef33ea2c0047ed8c3117c259166e24d1647608;hpb=be677dc4f44fb8ec793d9280fada8b9a0ea833f8;p=rust-lightning diff --git a/fuzz/src/msg_targets/msg_channel_update.rs b/fuzz/src/msg_targets/msg_channel_update.rs index aaef33ea..1cd9ddbb 100644 --- a/fuzz/src/msg_targets/msg_channel_update.rs +++ b/fuzz/src/msg_targets/msg_channel_update.rs @@ -1,24 +1,27 @@ +// This file is Copyright its original authors, visible in version control +// history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license +// , at your option. +// You may not use this file except in accordance with one or both of these +// licenses. + // This file is auto-generated by gen_target.sh based on msg_target_template.txt // To modify it, modify msg_target_template.txt and run gen_target.sh instead. use lightning::ln::msgs; use msg_targets::utils::VecWriter; +use utils::test_logger; #[inline] -pub fn do_test(data: &[u8]) { - test_msg_exact!(msgs::ChannelUpdate, data); +pub fn msg_channel_update_test(data: &[u8], _out: Out) { + test_msg_hole!(msgs::ChannelUpdate, data, 108, 1); } #[no_mangle] pub extern "C" fn msg_channel_update_run(data: *const u8, datalen: usize) { - do_test(unsafe { std::slice::from_raw_parts(data, datalen) }); -} - -#[cfg(test)] -mod tests { - #[test] - fn duplicate_crash() { - super::do_test(&::hex::decode("00").unwrap()); - } + let data = unsafe { std::slice::from_raw_parts(data, datalen) }; + test_msg_hole!(msgs::ChannelUpdate, data, 108, 1); }