File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1091,6 +1091,21 @@ where
1091
1091
/// Additionally, [`ChannelManager`] implements both [`chain::Listen`] and [`chain::Confirm`] for
1092
1092
/// notification of on-chain activity.
1093
1093
///
1094
+ /// # `ChannelManager` vs `ChannelMonitor`
1095
+ ///
1096
+ /// It's important to distinguish between the *off-chain* management and *on-chain* monitoring of
1097
+ /// lightning channels. [`ChannelManager`] exchanges messages with peers to manage the off-chain
1098
+ /// state of each channel. During this process, it generates a [`ChannelMonitor`] for each channel
1099
+ /// and a [`ChannelMonitorUpdate`] for each relevant change, notifying its parameterized
1100
+ /// [`chain::Watch`] of them.
1101
+ ///
1102
+ /// An implementation of [`chain::Watch`], such as [`ChainMonitor`], is responsible for aggregating
1103
+ /// these [`ChannelMonitor`]s and applying any [`ChannelMonitorUpdate`]s to them. It then monitors
1104
+ /// for any pertinent on-chain activity, broadcasting claims as needed.
1105
+ ///
1106
+ /// This division of off-chain management and on-chain monitoring is what allows for interesting
1107
+ /// node setups. See the [`chain`] module for further details.
1108
+ ///
1094
1109
/// # Persistence
1095
1110
///
1096
1111
/// 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