X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fln%2Fchanmon_update_fail_tests.rs;h=322ec7d8c0eb9605f199fcdfdac7b7cfbc9a8dd8;hb=e2a9ed7265680cc821f29860264c7f4d53e044b9;hp=fc481f8aac7bb8e5b3326e12e5f8d5dc83ddb895;hpb=a138a9af010d5c6e80caaae56a3116051f3df653;p=rust-lightning diff --git a/src/ln/chanmon_update_fail_tests.rs b/src/ln/chanmon_update_fail_tests.rs index fc481f8a..322ec7d8 100644 --- a/src/ln/chanmon_update_fail_tests.rs +++ b/src/ln/chanmon_update_fail_tests.rs @@ -13,8 +13,6 @@ use util::errors::APIError; use bitcoin_hashes::sha256::Hash as Sha256; use bitcoin_hashes::Hash; -use std::time::Instant; - use ln::functional_test_utils::*; #[test] @@ -674,7 +672,7 @@ fn do_test_monitor_update_fail_raa(test_ignore_second_cs: bool) { let (_, payment_hash_1) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 1000000); // Fail the payment backwards, failing the monitor update on nodes[1]'s receipt of the RAA - assert!(nodes[2].node.fail_htlc_backwards(&payment_hash_1, 0)); + assert!(nodes[2].node.fail_htlc_backwards(&payment_hash_1)); expect_pending_htlcs_forwardable!(nodes[2]); check_added_monitors!(nodes[2], 1); @@ -1451,7 +1449,7 @@ fn test_monitor_update_on_pending_forwards() { send_payment(&nodes[0], &[&nodes[1], &nodes[2]], 5000000); let (_, payment_hash_1) = route_payment(&nodes[0], &[&nodes[1], &nodes[2]], 1000000); - assert!(nodes[2].node.fail_htlc_backwards(&payment_hash_1, 1000000)); + assert!(nodes[2].node.fail_htlc_backwards(&payment_hash_1)); expect_pending_htlcs_forwardable!(nodes[2]); check_added_monitors!(nodes[2], 1); @@ -1495,7 +1493,6 @@ fn test_monitor_update_on_pending_forwards() { Event::PendingHTLCsForwardable { .. } => { }, _ => panic!("Unexpected event"), }; - nodes[0].node.channel_state.lock().unwrap().next_forward = Instant::now(); nodes[0].node.process_pending_htlc_forwards(); expect_payment_received!(nodes[0], payment_hash_2, 1000000);