X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fonion_route_tests.rs;h=c6730e8ca846b96e7325ea6c9ff79e2988499028;hb=5b28744755a4a5ef0303c9cbf927502495194055;hp=f4ad80903e6896704ba09c14cd5d129e5cbc8e06;hpb=1ab0a1acc1e3880b9cb9aece4cd4274bef9c7973;p=rust-lightning diff --git a/lightning/src/ln/onion_route_tests.rs b/lightning/src/ln/onion_route_tests.rs index f4ad8090..c6730e8c 100644 --- a/lightning/src/ln/onion_route_tests.rs +++ b/lightning/src/ln/onion_route_tests.rs @@ -11,8 +11,8 @@ //! These tests work by standing up full nodes and route payments across the network, checking the //! returned errors decode to the correct thing. +use chain::channelmonitor::{CLTV_CLAIM_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS}; use ln::channelmanager::{HTLCForwardInfo, PaymentPreimage, PaymentHash}; -use ln::channelmonitor::{CLTV_CLAIM_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS}; use ln::onion_utils; use routing::router::{Route, get_route}; use ln::features::InitFeatures; @@ -219,7 +219,7 @@ impl msgs::ChannelUpdate { use bitcoin::secp256k1::ffi::Signature as FFISignature; use bitcoin::secp256k1::Signature; msgs::ChannelUpdate { - signature: Signature::from(FFISignature::new()), + signature: Signature::from(unsafe { FFISignature::new() }), contents: msgs::UnsignedChannelUpdate { chain_hash: BlockHash::hash(&vec![0u8][..]), short_channel_id: 0, @@ -282,7 +282,7 @@ fn test_onion_failure() { let (_, payment_hash) = get_payment_preimage_hash!(nodes[0]); let net_graph_msg_handler = &nodes[0].net_graph_msg_handler; let logger = test_utils::TestLogger::new(); - let route = get_route(&nodes[0].node.get_our_node_id(), &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[2].node.get_our_node_id(), None, &Vec::new(), 40000, TEST_FINAL_CLTV, &logger).unwrap(); + let route = get_route(&nodes[0].node.get_our_node_id(), &net_graph_msg_handler.network_graph.read().unwrap(), &nodes[2].node.get_our_node_id(), None, None, &Vec::new(), 40000, TEST_FINAL_CLTV, &logger).unwrap(); // positve case send_payment(&nodes[0], &vec!(&nodes[1], &nodes[2])[..], 40000, 40_000);