X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Ffunctional_test_utils.rs;h=82fa06f5c80b8a5494b9b546d4e5ccb0d4287999;hb=c91debba1ac78639f68263556ea1ee6e51f3f140;hp=2c4c3c0c2676f05ca3e03961b8db5b8e1df40a0b;hpb=23c5308bcbea61d89b1e5d3df6b6da721bc74c2a;p=rust-lightning diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs index 2c4c3c0c..82fa06f5 100644 --- a/lightning/src/ln/functional_test_utils.rs +++ b/lightning/src/ln/functional_test_utils.rs @@ -422,6 +422,10 @@ pub struct Node<'chan_man, 'node_cfg: 'chan_man, 'chan_mon_cfg: 'node_cfg> { &'chan_mon_cfg test_utils::TestLogger, >, } +#[cfg(feature = "std")] +impl<'a, 'b, 'c> std::panic::UnwindSafe for Node<'a, 'b, 'c> {} +#[cfg(feature = "std")] +impl<'a, 'b, 'c> std::panic::RefUnwindSafe for Node<'a, 'b, 'c> {} impl<'a, 'b, 'c> Node<'a, 'b, 'c> { pub fn best_block_hash(&self) -> BlockHash { self.blocks.lock().unwrap().last().unwrap().0.block_hash() @@ -1854,7 +1858,7 @@ pub fn get_route(send_node: &Node, route_params: &RouteParameters) -> Result>()), - send_node.logger, &scorer, &(), &random_seed_bytes + send_node.logger, &scorer, &Default::default(), &random_seed_bytes ) } @@ -2506,7 +2510,7 @@ pub fn route_over_limit<'a, 'b, 'c>(origin_node: &Node<'a, 'b, 'c>, expected_rou let keys_manager = test_utils::TestKeysInterface::new(&seed, Network::Testnet); let random_seed_bytes = keys_manager.get_secure_random_bytes(); let route = router::get_route(&origin_node.node.get_our_node_id(), &route_params, &network_graph, - None, origin_node.logger, &scorer, &(), &random_seed_bytes).unwrap(); + None, origin_node.logger, &scorer, &Default::default(), &random_seed_bytes).unwrap(); assert_eq!(route.paths.len(), 1); assert_eq!(route.paths[0].hops.len(), expected_route.len()); for (node, hop) in expected_route.iter().zip(route.paths[0].hops.iter()) {