@@ -59,6 +59,7 @@ use crate::ln::wire::Encode;
59
59
use crate::offers::offer::{DerivedMetadata, OfferBuilder};
60
60
use crate::offers::parse::Bolt12SemanticError;
61
61
use crate::offers::refund::RefundBuilder;
62
+ use crate::onion_message::{OffersMessage, PendingOnionMessage};
62
63
use crate::sign::{EntropySource, KeysManager, NodeSigner, Recipient, SignerProvider, WriteableEcdsaChannelSigner};
63
64
use crate::util::config::{UserConfig, ChannelConfig, ChannelConfigUpdate};
64
65
use crate::util::wakers::{Future, Notifier};
@@ -982,33 +983,35 @@ where
982
983
//
983
984
// Lock order tree:
984
985
//
986
+ // `pending_offers_messages`
987
+ //
985
988
// `total_consistency_lock`
986
989
// |
987
990
// |__`forward_htlcs`
988
991
// | |
989
992
// | |__`pending_intercepted_htlcs`
990
993
// |
991
994
// |__`per_peer_state`
992
- // | |
993
- // | |__`pending_inbound_payments`
994
- // | |
995
- // | |__`claimable_payments`
996
- // | |
997
- // | |__`pending_outbound_payments` // This field's struct contains a map of pending outbounds
998
- // | |
999
- // | |__`peer_state`
1000
- // | |
1001
- // | |__`id_to_peer`
1002
- // | |
1003
- // | |__`short_to_chan_info`
1004
- // | |
1005
- // | |__`outbound_scid_aliases`
1006
- // | |
1007
- // | |__`best_block`
1008
- // | |
1009
- // | |__`pending_events`
1010
- // | |
1011
- // | |__`pending_background_events`
995
+ // |
996
+ // |__`pending_inbound_payments`
997
+ // |
998
+ // |__`claimable_payments`
999
+ // |
1000
+ // |__`pending_outbound_payments` // This field's struct contains a map of pending outbounds
1001
+ // |
1002
+ // |__`peer_state`
1003
+ // |
1004
+ // |__`id_to_peer`
1005
+ // |
1006
+ // |__`short_to_chan_info`
1007
+ // |
1008
+ // |__`outbound_scid_aliases`
1009
+ // |
1010
+ // |__`best_block`
1011
+ // |
1012
+ // |__`pending_events`
1013
+ // |
1014
+ // |__`pending_background_events`
1012
1015
//
1013
1016
pub struct ChannelManager<M: Deref, T: Deref, ES: Deref, NS: Deref, SP: Deref, F: Deref, R: Deref, L: Deref>
1014
1017
where
@@ -1220,6 +1223,8 @@ where
1220
1223
event_persist_notifier: Notifier,
1221
1224
needs_persist_flag: AtomicBool,
1222
1225
1226
+ pending_offers_messages: Mutex<Vec<PendingOnionMessage<OffersMessage>>>,
1227
+
1223
1228
entropy_source: ES,
1224
1229
node_signer: NS,
1225
1230
signer_provider: SP,
@@ -2300,6 +2305,8 @@ where
2300
2305
needs_persist_flag: AtomicBool::new(false),
2301
2306
funding_batch_states: Mutex::new(BTreeMap::new()),
2302
2307
2308
+ pending_offers_messages: Mutex::new(Vec::new()),
2309
+
2303
2310
entropy_source,
2304
2311
node_signer,
2305
2312
signer_provider,
@@ -10097,6 +10104,8 @@ where
10097
10104
10098
10105
funding_batch_states: Mutex::new(BTreeMap::new()),
10099
10106
10107
+ pending_offers_messages: Mutex::new(Vec::new()),
10108
+
10100
10109
entropy_source: args.entropy_source,
10101
10110
node_signer: args.node_signer,
10102
10111
signer_provider: args.signer_provider,
0 commit comments