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/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2021-12-fix-retries-races;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 { .. } => {