From: Matt Corallo Date: Mon, 13 Dec 2021 17:41:36 +0000 (+0000) Subject: Make attempting to retry a succeeded payment an APIError, not Route X-Git-Tag: v0.0.104~7^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=05d7a33a581076fbea1e9d626c40e0c3c44031b1;p=rust-lightning Make attempting to retry a succeeded payment an APIError, not Route This is symmetric with the new failure once a payment is abandoned. --- diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 4caa5435e..bd3b3683e 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -2393,8 +2393,8 @@ impl ChannelMana })) }, PendingOutboundPayment::Fulfilled { .. } => { - return Err(PaymentSendFailure::ParameterError(APIError::RouteError { - err: "Payment already completed" + return Err(PaymentSendFailure::ParameterError(APIError::APIMisuseError { + err: "Payment already completed".to_owned() })); }, PendingOutboundPayment::Abandoned { .. } => {