X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fonion_route_tests.rs;h=bf2709cded67badeb799e261e66c324bbf1c3c46;hb=cda8fb7f6f6e3207edc97e2024b875ae5a3c42c6;hp=2c6c3f218deecff454c5ac765db1621e9ffe9baa;hpb=a7b2eb6d98eafa84f0516c9ba8321a3f653a84bd;p=rust-lightning diff --git a/lightning/src/ln/onion_route_tests.rs b/lightning/src/ln/onion_route_tests.rs index 2c6c3f21..bf2709cd 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; @@ -64,7 +64,7 @@ fn run_onion_failure_test_with_fail_intercept(_name: &str, test_case: txdata: vec![], }; for ix in 0..nodes.len() { - nodes[ix].block_notifier.block_connected(&block, 1); + connect_block(&nodes[ix], &block, 1); } macro_rules! expect_event { @@ -448,7 +448,7 @@ fn test_onion_failure() { txdata: vec![], }; - nodes[1].block_notifier.block_connected(&block, height); + connect_block(&nodes[1], &block, height); }, ||{}, true, Some(UPDATE|14), Some(msgs::HTLCFailChannelUpdate::ChannelUpdateMessage{msg: ChannelUpdate::dummy()})); run_onion_failure_test("unknown_payment_hash", 2, &nodes, &route, &payment_hash, |_| {}, || { @@ -462,7 +462,7 @@ fn test_onion_failure() { txdata: vec![], }; - nodes[2].block_notifier.block_connected(&block, height); + connect_block(&nodes[2], &block, height); }, || {}, true, Some(17), None); run_onion_failure_test("final_incorrect_cltv_expiry", 1, &nodes, &route, &payment_hash, |_| {}, || {