Merge pull request #2068 from jkczyz/2023-03-doc-fixes
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 82b572cda84c77e5610ce4ad7a90dfb8a2d05de7..62629fc548679dfa56b9a58ae711704942657e06 100644 (file)
 //! responsible for tracking which channels are open, HTLCs are in flight and reestablishing those
 //! upon reconnect to the relevant peer(s).
 //!
-//! It does not manage routing logic (see [`find_route`] for that) nor does it manage constructing
+//! It does not manage routing logic (see [`Router`] for that) nor does it manage constructing
 //! on-chain transactions (it only monitors the chain to watch for any force-closes that might
 //! imply it needs to fail HTLCs/payments/channels it manages).
-//!
-//! [`find_route`]: crate::routing::router::find_route
 
 use bitcoin::blockdata::block::BlockHeader;
 use bitcoin::blockdata::transaction::Transaction;
@@ -1775,14 +1773,12 @@ where
                self.list_channels_with_filter(|_| true)
        }
 
-       /// Gets the list of usable channels, in random order. Useful as an argument to [`find_route`]
-       /// to ensure non-announced channels are used.
+       /// Gets the list of usable channels, in random order. Useful as an argument to
+       /// [`Router::find_route`] to ensure non-announced channels are used.
        ///
        /// These are guaranteed to have their [`ChannelDetails::is_usable`] value set to true, see the
        /// documentation for [`ChannelDetails::is_usable`] for more info on exactly what the criteria
        /// are.
-       ///
-       /// [`find_route`]: crate::routing::router::find_route
        pub fn list_usable_channels(&self) -> Vec<ChannelDetails> {
                // Note we use is_live here instead of usable which leads to somewhat confused
                // internal/external nomenclature, but that's ok cause that's probably what the user
@@ -4016,7 +4012,7 @@ where
                        None => None
                };
 
-               let mut peer_state_opt = counterparty_node_id_opt.as_ref().map(
+               let peer_state_opt = counterparty_node_id_opt.as_ref().map(
                        |counterparty_node_id| per_peer_state.get(counterparty_node_id).map(
                                |peer_mutex| peer_mutex.lock().unwrap()
                        )