Skip to content

Commit 5b1f2b3

Browse files
Store AsyncPaymentsMessages for later sending
Upcoming commits will support sending and receiving held_htlc_available and release_held_htlc messages. These messages need to be enqueued so that they can be released in ChannelManager's implementation of AsyncPaymentsMessageHandler to OnionMessenger for sending.
1 parent 43c7d40 commit 5b1f2b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,8 @@ where
19321932
//
19331933
// `pending_offers_messages`
19341934
//
1935+
// `pending_async_payments_messages`
1936+
//
19351937
// `total_consistency_lock`
19361938
// |
19371939
// |__`forward_htlcs`
@@ -2184,6 +2186,7 @@ where
21842186
needs_persist_flag: AtomicBool,
21852187

21862188
pending_offers_messages: Mutex<Vec<PendingOnionMessage<OffersMessage>>>,
2189+
pending_async_payments_messages: Mutex<Vec<PendingOnionMessage<AsyncPaymentsMessage>>>,
21872190

21882191
/// Tracks the message events that are to be broadcasted when we are connected to some peer.
21892192
pending_broadcast_messages: Mutex<Vec<MessageSendEvent>>,
@@ -2978,6 +2981,7 @@ where
29782981
funding_batch_states: Mutex::new(BTreeMap::new()),
29792982

29802983
pending_offers_messages: Mutex::new(Vec::new()),
2984+
pending_async_payments_messages: Mutex::new(Vec::new()),
29812985
pending_broadcast_messages: Mutex::new(Vec::new()),
29822986

29832987
last_days_feerates: Mutex::new(VecDeque::new()),
@@ -12421,6 +12425,7 @@ where
1242112425
funding_batch_states: Mutex::new(BTreeMap::new()),
1242212426

1242312427
pending_offers_messages: Mutex::new(Vec::new()),
12428+
pending_async_payments_messages: Mutex::new(Vec::new()),
1242412429

1242512430
pending_broadcast_messages: Mutex::new(Vec::new()),
1242612431

0 commit comments

Comments
 (0)