From 05d7a33a581076fbea1e9d626c40e0c3c44031b1 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 13 Dec 2021 17:41:36 +0000 Subject: [PATCH] Make attempting to retry a succeeded payment an APIError, not Route This is symmetric with the new failure once a payment is abandoned. --- lightning/src/ln/channelmanager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 { .. } => { -- 2.39.5