Skip to content

Commit 789b56b

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 01cfeff commit 789b56b

File tree

14 files changed

+120
-238
lines changed

14 files changed

+120
-238
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
]

fuzz/src/full_stack.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,9 @@ fn two_peer_forwarding_seed() -> Vec<u8> {
11711171
ext_from_hex("030120", &mut test);
11721172
// init message (type 16) with static_remotekey required, no anchors/taproot, and other bits optional and mac
11731173
ext_from_hex("0010 00021aaa 0008aaa210aa2a0a9aaa 01000000000000000000000000000000", &mut test);
1174+
// One feerate request on peer connection due to a list_channels call when seeing if the async
1175+
// receive offer cache needs updating
1176+
ext_from_hex("00fd", &mut test);
11741177

11751178
// create outbound channel to peer 1 for 50k sat
11761179
ext_from_hex(

lightning/src/events/mod.rs

Lines changed: 2 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`].
@@ -1645,6 +1644,8 @@ pub enum Event {
16451644
///
16461645
/// When an [`Event::StaticInvoiceRequested`] comes in for the invoice, this id will be surfaced
16471646
/// and can be used alongside the `invoice_id` to retrieve the invoice from the database.
1647+
///
1648+
///[`ChannelManager::blinded_paths_for_async_recipient`]: crate::ln::channelmanager::ChannelManager::blinded_paths_for_async_recipient
16481649
recipient_id: Vec<u8>,
16491650
/// A random identifier for the invoice. When an [`Event::StaticInvoiceRequested`] comes in for
16501651
/// the invoice, this id will be surfaced and can be used alongside the `recipient_id` to
@@ -1676,7 +1677,6 @@ pub enum Event {
16761677
/// [`ChannelManager::set_paths_to_static_invoice_server`]: crate::ln::channelmanager::ChannelManager::set_paths_to_static_invoice_server
16771678
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
16781679
/// [`ChannelManager::send_static_invoice`]: crate::ln::channelmanager::ChannelManager::send_static_invoice
1679-
#[cfg(async_payments)]
16801680
StaticInvoiceRequested {
16811681
/// An identifier for the recipient previously surfaced in
16821682
/// [`Event::PersistStaticInvoice::recipient_id`]. Useful when paired with the `invoice_id` to
@@ -2123,13 +2123,11 @@ impl Writeable for Event {
21232123
(8, former_temporary_channel_id, required),
21242124
});
21252125
},
2126-
#[cfg(async_payments)]
21272126
&Event::PersistStaticInvoice { .. } => {
21282127
45u8.write(writer)?;
21292128
// No need to write these events because we can just restart the static invoice negotiation
21302129
// on startup.
21312130
},
2132-
#[cfg(async_payments)]
21332131
&Event::StaticInvoiceRequested { .. } => {
21342132
47u8.write(writer)?;
21352133
// Never write StaticInvoiceRequested events as buffered onion messages aren't serialized.
@@ -2711,10 +2709,8 @@ impl MaybeReadable for Event {
27112709
}))
27122710
},
27132711
// Note that we do not write a length-prefixed TLV for PersistStaticInvoice events.
2714-
#[cfg(async_payments)]
27152712
45u8 => Ok(None),
27162713
// Note that we do not write a length-prefixed TLV for StaticInvoiceRequested events.
2717-
#[cfg(async_payments)]
27182714
47u8 => Ok(None),
27192715
// Versions prior to 0.0.100 did not ignore odd types, instead returning InvalidValue.
27202716
// Version 0.0.100 failed to properly ignore odd types, possibly resulting in corrupt

0 commit comments

Comments
 (0)