diff --git a/src/error.rs b/src/error.rs index 0182b3092..7762426c3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -61,6 +61,8 @@ pub enum Error { InvalidChannelId, /// The given network is invalid. InvalidNetwork, + /// The custom TLVs are invalid. + InvalidCustomTlv, /// A payment with the given hash has already been initiated. DuplicatePayment, /// The available funds are insufficient to complete the given operation. diff --git a/src/lib.rs b/src/lib.rs index f580246e2..4741883c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1257,7 +1257,7 @@ impl Node { .with_custom_tlvs(custom_tlvs.into_iter().map(|tlv| (tlv.r#type, tlv.value)).collect()) .map_err(|_| { log_error!(self.logger, "Payment error: invalid custom TLVs."); - Error::PaymentSendingFailed + Error::InvalidCustomTlv })?; match self.channel_manager.send_spontaneous_payment_with_retry(