X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-invoice%2Fsrc%2Fpayment.rs;h=476d12a34751e885c43980453ede2db9288d0cd5;hb=refs%2Fheads%2F2022-07-warnings;hp=051893ea0a3a5c9ce0405045e828644928f5c8d0;hpb=4e5f74a6f30baee087b805564a2445d2840f120c;p=rust-lightning diff --git a/lightning-invoice/src/payment.rs b/lightning-invoice/src/payment.rs index 051893ea..476d12a3 100644 --- a/lightning-invoice/src/payment.rs +++ b/lightning-invoice/src/payment.rs @@ -1437,8 +1437,6 @@ mod tests { enum TestResult { PaymentFailure { path: Vec, short_channel_id: u64 }, PaymentSuccess { path: Vec }, - ProbeFailure { path: Vec, short_channel_id: u64 }, - ProbeSuccess { path: Vec }, } impl TestScorer { @@ -1474,12 +1472,6 @@ mod tests { Some(TestResult::PaymentSuccess { path }) => { panic!("Unexpected successful payment path: {:?}", path) }, - Some(TestResult::ProbeFailure { path, .. }) => { - panic!("Unexpected failed payment probe: {:?}", path) - }, - Some(TestResult::ProbeSuccess { path }) => { - panic!("Unexpected successful payment probe: {:?}", path) - }, None => panic!("Unexpected payment_path_failed call: {:?}", actual_path), } } @@ -1494,18 +1486,12 @@ mod tests { Some(TestResult::PaymentSuccess { path }) => { assert_eq!(actual_path, &path.iter().collect::>()[..]); }, - Some(TestResult::ProbeFailure { path, .. }) => { - panic!("Unexpected failed payment probe: {:?}", path) - }, - Some(TestResult::ProbeSuccess { path }) => { - panic!("Unexpected successful payment probe: {:?}", path) - }, None => panic!("Unexpected payment_path_successful call: {:?}", actual_path), } } } - fn probe_failed(&mut self, actual_path: &[&RouteHop], actual_short_channel_id: u64) { + fn probe_failed(&mut self, actual_path: &[&RouteHop], _: u64) { if let Some(expectations) = &mut self.expectations { match expectations.pop_front() { Some(TestResult::PaymentFailure { path, .. }) => { @@ -1514,13 +1500,6 @@ mod tests { Some(TestResult::PaymentSuccess { path }) => { panic!("Unexpected successful payment path: {:?}", path) }, - Some(TestResult::ProbeFailure { path, short_channel_id }) => { - assert_eq!(actual_path, &path.iter().collect::>()[..]); - assert_eq!(actual_short_channel_id, short_channel_id); - }, - Some(TestResult::ProbeSuccess { path }) => { - panic!("Unexpected successful payment probe: {:?}", path) - }, None => panic!("Unexpected payment_path_failed call: {:?}", actual_path), } } @@ -1534,12 +1513,6 @@ mod tests { Some(TestResult::PaymentSuccess { path }) => { panic!("Unexpected successful payment path: {:?}", path) }, - Some(TestResult::ProbeFailure { path, .. }) => { - panic!("Unexpected failed payment probe: {:?}", path) - }, - Some(TestResult::ProbeSuccess { path }) => { - assert_eq!(actual_path, &path.iter().collect::>()[..]); - }, None => panic!("Unexpected payment_path_successful call: {:?}", actual_path), } }