File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -974,6 +974,37 @@ where
974
974
/// Additionally, [`ChannelManager`] implements both [`chain::Listen`] and [`chain::Confirm`] for
975
975
/// notification of on-chain events.
976
976
///
977
+ /// # `ChannelManager` vs `ChannelMonitor`
978
+ ///
979
+ /// It's important to distinguish between the *off-chain* management and *on-chain* monitoring of
980
+ /// lightning channels. [`ChannelManager`] exchanges messages with peers to manage the off-chain
981
+ /// state of each channel. During this process, it generates a [`ChannelMonitor`] for each channel
982
+ /// and a [`ChannelMonitorUpdate`] for each relevant change, notifying its parameterized
983
+ /// [`chain::Watch`] of them.
984
+ ///
985
+ /// An implementation of [`chain::Watch`], such as [`ChainMonitor`], is responsible for aggregating
986
+ /// these [`ChannelMonitor`]s and applying any [`ChannelMonitorUpdate`]s to them. It then monitors
987
+ /// for any pertinent on-chain activity, broadcasting claims as needed.
988
+ ///
989
+ /// This division of off-chain management and on-chain monitoring is what allows for interesting
990
+ /// node setups. See the [`chain`] module for further details.
991
+ ///
992
+ /// # Initialization
993
+ ///
994
+ /// TODO
995
+ ///
996
+ /// # Operation
997
+ ///
998
+ /// TODO
999
+ /// - event processing
1000
+ /// - timer ticks
1001
+ /// - chain data
1002
+ /// - persistence
1003
+ ///
1004
+ /// # Payments
1005
+ ///
1006
+ /// TODO
1007
+ ///
977
1008
/// # Persistence
978
1009
///
979
1010
/// Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for
You can’t perform that action at this time.
0 commit comments