1 // Imports that need to be added manually
2 use lightning_rapid_gossip_sync::RapidGossipSync;
4 use crate::utils::test_logger;
6 /// Actual fuzz test, method signature and name are fixed
7 fn do_test<Out: test_logger::Output>(data: &[u8], out: Out) {
8 let logger = test_logger::TestLogger::new("".to_owned(), out);
9 let network_graph = lightning::routing::gossip::NetworkGraph::new(bitcoin::Network::Bitcoin, &logger);
10 let rapid_sync = RapidGossipSync::new(&network_graph, &logger);
11 let _ = rapid_sync.update_network_graph(data);
14 /// Method that needs to be added manually, {name}_test
15 pub fn process_network_graph_test<Out: test_logger::Output>(data: &[u8], out: Out) {
19 /// Method that needs to be added manually, {name}_run
21 pub extern "C" fn process_network_graph_run(data: *const u8, datalen: usize) {
22 do_test(unsafe { std::slice::from_raw_parts(data, datalen) }, test_logger::DevNull {});