From b6ceafb4f6f8a1957d27d788e9f811e39cd4e5b1 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Wed, 6 Nov 2024 16:53:07 -0600 Subject: [PATCH] Deprecate functions in invoice_utils module ChannelManager::create_bolt11_invoice is a simpler and more flexible way of creating a BOLT11 invoice, so deprecate the corresponding functions in the invoice_utils module. --- lightning/src/ln/invoice_utils.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lightning/src/ln/invoice_utils.rs b/lightning/src/ln/invoice_utils.rs index be1b430dd..a39222c3f 100644 --- a/lightning/src/ln/invoice_utils.rs +++ b/lightning/src/ln/invoice_utils.rs @@ -313,6 +313,7 @@ fn rotate_through_iterators>(mut vecs: Vec) -> impl }) } +#[deprecated(note = "Use ChannelManager::create_bolt11_invoice instead.")] /// Utility to construct an invoice. Generally, unless you want to do something like a custom /// cltv_expiry, this is what you should be using to create an invoice. The reason being, this /// method stores the invoice's payment secret and preimage in `ChannelManager`, so (a) the user @@ -354,6 +355,7 @@ where channelmanager.create_bolt11_invoice(params) } +#[deprecated(note = "Use ChannelManager::create_bolt11_invoice instead.")] /// Utility to construct an invoice. Generally, unless you want to do something like a custom /// cltv_expiry, this is what you should be using to create an invoice. The reason being, this /// method stores the invoice's payment secret and preimage in `ChannelManager`, so (a) the user @@ -396,6 +398,7 @@ where channelmanager.create_bolt11_invoice(params) } +#[deprecated(note = "Use ChannelManager::create_bolt11_invoice instead.")] /// See [`create_invoice_from_channelmanager`]. /// /// This version allows for providing custom [`PaymentHash`] and description hash for the invoice. @@ -429,6 +432,7 @@ where channelmanager.create_bolt11_invoice(params) } +#[deprecated(note = "Use ChannelManager::create_bolt11_invoice instead.")] /// See [`create_invoice_from_channelmanager`]. /// /// This version allows for providing a custom [`PaymentHash`] for the invoice. -- 2.39.5