@@ -957,6 +957,8 @@ where
957
957
/// Implements [`ChannelMessageHandler`], handling the multi-channel parts and passing things through
958
958
/// to individual Channels.
959
959
///
960
+ /// # Persistence
961
+ ///
960
962
/// Implements [`Writeable`] to write out all channel state to disk. Implies [`peer_disconnected`] for
961
963
/// all peers during write/read (though does not modify this instance, only the instance being
962
964
/// serialized). This will result in any channels which have not yet exchanged [`funding_created`] (i.e.,
@@ -976,12 +978,16 @@ where
976
978
/// tells you the last block hash which was connected. You should get the best block tip before using the manager.
977
979
/// See [`chain::Listen`] and [`chain::Confirm`] for more details.
978
980
///
981
+ /// # `ChannelUpdate` Messages
982
+ ///
979
983
/// Note that `ChannelManager` is responsible for tracking liveness of its channels and generating
980
984
/// [`ChannelUpdate`] messages informing peers that the channel is temporarily disabled. To avoid
981
985
/// spam due to quick disconnection/reconnection, updates are not sent until the channel has been
982
986
/// offline for a full minute. In order to track this, you must call
983
987
/// [`timer_tick_occurred`] roughly once per minute, though it doesn't have to be perfect.
984
988
///
989
+ /// # DoS Mitigation
990
+ ///
985
991
/// To avoid trivial DoS issues, `ChannelManager` limits the number of inbound connections and
986
992
/// inbound channels without confirmed funding transactions. This may result in nodes which we do
987
993
/// not have a channel with being unable to connect to us or open new channels with us if we have
@@ -991,6 +997,8 @@ where
991
997
/// exempted from the count of unfunded channels. Similarly, outbound channels and connections are
992
998
/// never limited. Please ensure you limit the count of such channels yourself.
993
999
///
1000
+ /// # Type Aliases
1001
+ ///
994
1002
/// Rather than using a plain `ChannelManager`, it is preferable to use either a [`SimpleArcChannelManager`]
995
1003
/// a [`SimpleRefChannelManager`], for conciseness. See their documentation for more details, but
996
1004
/// essentially you should default to using a [`SimpleRefChannelManager`], and use a
0 commit comments