X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Fmsg_targets%2Fmsg_update_fulfill_htlc.rs;h=7f9463e2731c7911196247dc6cfb07b6be3e4006;hb=119668a6cb33b0ea9862fd532b11ca41ffae8f7d;hp=ab7277084051656d31922f091e9d087d0df2461d;hpb=be677dc4f44fb8ec793d9280fada8b9a0ea833f8;p=rust-lightning diff --git a/fuzz/src/msg_targets/msg_update_fulfill_htlc.rs b/fuzz/src/msg_targets/msg_update_fulfill_htlc.rs index ab727708..7f9463e2 100644 --- a/fuzz/src/msg_targets/msg_update_fulfill_htlc.rs +++ b/fuzz/src/msg_targets/msg_update_fulfill_htlc.rs @@ -1,24 +1,25 @@ +// 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 crate::msg_targets::utils::VecWriter; +use crate::utils::test_logger; #[inline] -pub fn do_test(data: &[u8]) { - test_msg!(msgs::UpdateFulfillHTLC, data); +pub fn msg_update_fulfill_htlc_test(data: &[u8], _out: Out) { + test_msg_simple!(lightning::ln::msgs::UpdateFulfillHTLC, data); } #[no_mangle] pub extern "C" fn msg_update_fulfill_htlc_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_simple!(lightning::ln::msgs::UpdateFulfillHTLC, data); }