Implement the closing_signed TLV suffix with allowed fee ranges
[rust-lightning] / fuzz / src / msg_targets / msg_closing_signed.rs
index 9a959d58cc309ba907229b45ae4aa87006656d14..52f39af29a98f82150d6150493065c7b942cebe0 100644 (file)
@@ -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 <LICENSE-APACHE
+// or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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!(msgs::ClosingSigned, data);
+pub fn msg_closing_signed_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
+       test_msg_simple!(msgs::ClosingSigned, data);
 }
 
 #[no_mangle]
 pub extern "C" fn msg_closing_signed_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!(msgs::ClosingSigned, data);
 }