From 3d5d64a2c82795ed6353890a7a8a5ae530984eb3 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Thu, 13 Jun 2024 11:25:20 -0400 Subject: [PATCH] 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. --- lightning/src/ln/channelmanager.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index f21a0a20b..730332d2e 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -2060,6 +2060,8 @@ where // // `pending_offers_messages` // +// `pending_async_payments_messages` +// // `total_consistency_lock` // | // |__`forward_htlcs` @@ -2315,6 +2317,7 @@ where pending_offers_messages: Mutex>, #[cfg(any(test, feature = "_test_utils"))] pub(crate) pending_offers_messages: Mutex>, + pending_async_payments_messages: Mutex>, /// Tracks the message events that are to be broadcasted when we are connected to some peer. pending_broadcast_messages: Mutex>, @@ -3135,6 +3138,7 @@ where funding_batch_states: Mutex::new(BTreeMap::new()), pending_offers_messages: Mutex::new(Vec::new()), + pending_async_payments_messages: Mutex::new(Vec::new()), pending_broadcast_messages: Mutex::new(Vec::new()), last_days_feerates: Mutex::new(VecDeque::new()), @@ -12827,6 +12831,7 @@ where funding_batch_states: Mutex::new(BTreeMap::new()), pending_offers_messages: Mutex::new(Vec::new()), + pending_async_payments_messages: Mutex::new(Vec::new()), pending_broadcast_messages: Mutex::new(Vec::new()), -- 2.39.5