@@ -1074,6 +1074,8 @@ where
1074
1074
/// Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through
1075
1075
/// to individual Channels.
1076
1076
///
1077
+ /// # Persistence
1078
+ ///
1077
1079
/// Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for
1078
1080
/// all peers during write/read (though does not modify this instance, only the instance being
1079
1081
/// serialized). This will result in any channels which have not yet exchanged [`funding_created`] (i.e.,
@@ -1093,12 +1095,16 @@ where
1093
1095
/// tells you the last block hash which was connected. You should get the best block tip before using the manager.
1094
1096
/// See [`chain::Listen`] and [`chain::Confirm`] for more details.
1095
1097
///
1098
+ /// # `ChannelUpdate` Messages
1099
+ ///
1096
1100
/// Note that `ChannelManager` is responsible for tracking liveness of its channels and generating
1097
1101
/// [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid
1098
1102
/// spam due to quick disconnection/reconnection, updates are not sent until the channel has been
1099
1103
/// offline for a full minute. In order to track this, you must call
1100
1104
/// [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect.
1101
1105
///
1106
+ /// # DoS Mitigation
1107
+ ///
1102
1108
/// To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and
1103
1109
/// inbound channels without confirmed funding transactions. This may result in nodes which we do
1104
1110
/// not have a channel with being unable to connect to us or open new channels with us if we have
@@ -1108,6 +1114,8 @@ where
1108
1114
/// exempted from the count of unfunded channels. Similarly, outbound channels and connections are
1109
1115
/// never limited. Please ensure you limit the count of such channels yourself.
1110
1116
///
1117
+ /// # Type Aliases
1118
+ ///
1111
1119
/// Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`]
1112
1120
/// a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but
1113
1121
/// essentially you should default to using a [`SimpleRefChannelManager`], and use a
0 commit comments