@@ -258,6 +258,8 @@ pub struct ChainMonitor<ChannelSigner: EcdsaChannelSigner, C: Deref, T: Deref, F
258
258
/// A [`Notifier`] used to wake up the background processor in case we have any [`Event`]s for
259
259
/// it to give to users (or [`MonitorEvent`]s for `ChannelManager` to process).
260
260
event_notifier : Notifier ,
261
+
262
+ /// Messages to send to the peer. This is currently used to distribute PeerStorage to channel partners.
261
263
pending_send_only_events : Mutex < Vec < MessageSendEvent > > ,
262
264
263
265
our_peerstorage_encryption_key : PeerStorageKey ,
@@ -397,12 +399,16 @@ where C::Target: chain::Filter,
397
399
/// transactions relevant to the watched channels.
398
400
///
399
401
/// # Note
400
- /// `our_peerstorage_encryption_key` must be obtained from [`crate::sign:: NodeSigner::get_peer_storage_key() `].
402
+ /// `our_peerstorage_encryption_key` must be obtained from [`NodeSigner::get_peer_storage_key`].
401
403
/// This key is used to encrypt peer storage backups.
402
404
///
403
405
/// **Important**: This key should not be set arbitrarily or changed after initialization. The same key
404
- /// is obtained by the `ChannelManager` through `KeyMananger` to decrypt peer backups.
406
+ /// is obtained by the [ `ChannelManager`] through [`KeysManager`] to decrypt peer backups.
405
407
/// Using an inconsistent or incorrect key will result in the inability to decrypt previously encrypted backups.
408
+ ///
409
+ /// [`NodeSigner::get_peer_storage_key`]: crate::sign::NodeSigner::get_peer_storage_key
410
+ /// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
411
+ /// [`KeysManager`]: crate::sign::KeysManager
406
412
pub fn new ( chain_source : Option < C > , broadcaster : T , logger : L , feeest : F , persister : P , entropy_source : ES , our_peerstorage_encryption_key : PeerStorageKey ) -> Self {
407
413
Self {
408
414
monitors : RwLock :: new ( new_hash_map ( ) ) ,
0 commit comments