Skip to content

Commit 7525c85

Browse files
committed
Fix probe single path check.
1 parent c0a9e1a commit 7525c85

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2744,15 +2744,9 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
27442744

27452745
let payment_hash = PaymentHash(Sha256::hash(&preimage).into_inner());
27462746

2747-
if let Some(params) = &route.payment_params {
2748-
if params.max_path_count != 1 {
2749-
return Err(PaymentSendFailure::ParameterError(APIError::APIMisuseError {
2750-
err: "Probe payments need to be sent over a single path".to_string()
2751-
}))
2752-
}
2753-
} else {
2747+
if route.paths.len() > 1 {
27542748
return Err(PaymentSendFailure::ParameterError(APIError::APIMisuseError {
2755-
err: "No parameters provided".to_string()
2749+
err: "Probe payments need to be sent over a single path".to_string()
27562750
}))
27572751
}
27582752

0 commit comments

Comments
 (0)