@@ -1115,6 +1115,8 @@ where
1115
1115
/// Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through
1116
1116
/// to individual Channels.
1117
1117
///
1118
+ /// # Persistence
1119
+ ///
1118
1120
/// Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for
1119
1121
/// all peers during write/read (though does not modify this instance, only the instance being
1120
1122
/// serialized). This will result in any channels which have not yet exchanged [`funding_created`] (i.e.,
@@ -1134,12 +1136,16 @@ where
1134
1136
/// tells you the last block hash which was connected. You should get the best block tip before using the manager.
1135
1137
/// See [`chain::Listen`] and [`chain::Confirm`] for more details.
1136
1138
///
1139
+ /// # `ChannelUpdate` Messages
1140
+ ///
1137
1141
/// Note that `ChannelManager` is responsible for tracking liveness of its channels and generating
1138
1142
/// [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid
1139
1143
/// spam due to quick disconnection/reconnection, updates are not sent until the channel has been
1140
1144
/// offline for a full minute. In order to track this, you must call
1141
1145
/// [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect.
1142
1146
///
1147
+ /// # DoS Mitigation
1148
+ ///
1143
1149
/// To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and
1144
1150
/// inbound channels without confirmed funding transactions. This may result in nodes which we do
1145
1151
/// not have a channel with being unable to connect to us or open new channels with us if we have
@@ -1149,6 +1155,8 @@ where
1149
1155
/// exempted from the count of unfunded channels. Similarly, outbound channels and connections are
1150
1156
/// never limited. Please ensure you limit the count of such channels yourself.
1151
1157
///
1158
+ /// # Type Aliases
1159
+ ///
1152
1160
/// Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`]
1153
1161
/// a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but
1154
1162
/// essentially you should default to using a [`SimpleRefChannelManager`], and use a
0 commit comments