Skip to content

Commit 3d5d64a

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 e162278 commit 3d5d64a

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
@@ -2060,6 +2060,8 @@ where
20602060
//
20612061
// `pending_offers_messages`
20622062
//
2063+
// `pending_async_payments_messages`
2064+
//
20632065
// `total_consistency_lock`
20642066
// |
20652067
// |__`forward_htlcs`
@@ -2315,6 +2317,7 @@ where
23152317
pending_offers_messages: Mutex<Vec<(OffersMessage, MessageSendInstructions)>>,
23162318
#[cfg(any(test, feature = "_test_utils"))]
23172319
pub(crate) pending_offers_messages: Mutex<Vec<(OffersMessage, MessageSendInstructions)>>,
2320+
pending_async_payments_messages: Mutex<Vec<(AsyncPaymentsMessage, MessageSendInstructions)>>,
23182321

23192322
/// Tracks the message events that are to be broadcasted when we are connected to some peer.
23202323
pending_broadcast_messages: Mutex<Vec<MessageSendEvent>>,
@@ -3135,6 +3138,7 @@ where
31353138
funding_batch_states: Mutex::new(BTreeMap::new()),
31363139

31373140
pending_offers_messages: Mutex::new(Vec::new()),
3141+
pending_async_payments_messages: Mutex::new(Vec::new()),
31383142
pending_broadcast_messages: Mutex::new(Vec::new()),
31393143

31403144
last_days_feerates: Mutex::new(VecDeque::new()),
@@ -12827,6 +12831,7 @@ where
1282712831
funding_batch_states: Mutex::new(BTreeMap::new()),
1282812832

1282912833
pending_offers_messages: Mutex::new(Vec::new()),
12834+
pending_async_payments_messages: Mutex::new(Vec::new()),
1283012835

1283112836
pending_broadcast_messages: Mutex::new(Vec::new()),
1283212837

0 commit comments

Comments
 (0)