Rename EnforcingSigner to TestChannelSigner
[rust-lightning] / fuzz / src / onion_hop_data.rs
1 // This file is Copyright its original authors, visible in version control
2 // history.
3 //
4 // This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
5 // or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
7 // You may not use this file except in accordance with one or both of these
8 // licenses.
9
10 // This file is auto-generated by gen_target.sh based on msg_target_template.txt
11 // To modify it, modify msg_target_template.txt and run gen_target.sh instead.
12
13 use crate::utils::test_logger;
14
15 #[inline]
16 pub fn onion_hop_data_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
17         use lightning::util::ser::Readable;
18         let mut r = ::std::io::Cursor::new(data);
19         let _ =  <lightning::ln::msgs::InboundOnionPayload as Readable>::read(&mut r);
20 }
21
22 #[no_mangle]
23 pub extern "C" fn onion_hop_data_run(data: *const u8, datalen: usize) {
24         use lightning::util::ser::Readable;
25         let data = unsafe { std::slice::from_raw_parts(data, datalen) };
26         let mut r = ::std::io::Cursor::new(data);
27         let _ =  <lightning::ln::msgs::InboundOnionPayload as Readable>::read(&mut r);
28 }