Skip to content

Commit b4a4826

Browse files
Remove async payments cfg flag
We were previously cfg-gating all async payments code to not have a half-working public API, but now that async receive is usable go ahead and remove the gating. Paying as an async sender is not yet supported.
1 parent 1d55984 commit b4a4826

File tree

13 files changed

+115
-237
lines changed

13 files changed

+115
-237
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,5 @@ check-cfg = [
6666
"cfg(taproot)",
6767
"cfg(require_route_graph_test)",
6868
"cfg(splicing)",
69-
"cfg(async_payments)",
7069
"cfg(simple_close)",
7170
]

lightning/src/events/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,6 @@ pub enum Event {
16281628
///
16291629
/// [`ChannelManager::blinded_paths_for_async_recipient`]: crate::ln::channelmanager::ChannelManager::blinded_paths_for_async_recipient
16301630
/// [`ChannelManager::set_paths_to_static_invoice_server`]: crate::ln::channelmanager::ChannelManager::set_paths_to_static_invoice_server
1631-
#[cfg(async_payments)]
16321631
PersistStaticInvoice {
16331632
/// The invoice that should be persisted and later provided to payers when handling a future
16341633
/// [`Event::StaticInvoiceRequested`].
@@ -1676,7 +1675,6 @@ pub enum Event {
16761675
/// [`ChannelManager::set_paths_to_static_invoice_server`]: crate::ln::channelmanager::ChannelManager::set_paths_to_static_invoice_server
16771676
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
16781677
/// [`ChannelManager::send_static_invoice`]: crate::ln::channelmanager::ChannelManager::send_static_invoice
1679-
#[cfg(async_payments)]
16801678
StaticInvoiceRequested {
16811679
/// An identifier for the recipient previously surfaced in
16821680
/// [`Event::PersistStaticInvoice::recipient_id`]. Useful when paired with the `invoice_id` to
@@ -2123,13 +2121,11 @@ impl Writeable for Event {
21232121
(8, former_temporary_channel_id, required),
21242122
});
21252123
},
2126-
#[cfg(async_payments)]
21272124
&Event::PersistStaticInvoice { .. } => {
21282125
45u8.write(writer)?;
21292126
// No need to write these events because we can just restart the static invoice negotiation
21302127
// on startup.
21312128
},
2132-
#[cfg(async_payments)]
21332129
&Event::StaticInvoiceRequested { .. } => {
21342130
47u8.write(writer)?;
21352131
// Never write StaticInvoiceRequested events as buffered onion messages aren't serialized.
@@ -2711,10 +2707,8 @@ impl MaybeReadable for Event {
27112707
}))
27122708
},
27132709
// Note that we do not write a length-prefixed TLV for PersistStaticInvoice events.
2714-
#[cfg(async_payments)]
27152710
45u8 => Ok(None),
27162711
// Note that we do not write a length-prefixed TLV for StaticInvoiceRequested events.
2717-
#[cfg(async_payments)]
27182712
47u8 => Ok(None),
27192713
// Versions prior to 0.0.100 did not ignore odd types, instead returning InvalidValue.
27202714
// Version 0.0.100 failed to properly ignore odd types, possibly resulting in corrupt

0 commit comments

Comments
 (0)