|
13 | 13 | //! responsible for tracking which channels are open, HTLCs are in flight and reestablishing those
|
14 | 14 | //! upon reconnect to the relevant peer(s).
|
15 | 15 | //!
|
16 |
| -//! It does not manage routing logic (see routing::router::get_route for that) nor does it manage constructing |
| 16 | +//! It does not manage routing logic (see [`find_route`] for that) nor does it manage constructing |
17 | 17 | //! on-chain transactions (it only monitors the chain to watch for any force-closes that might
|
18 | 18 | //! imply it needs to fail HTLCs/payments/channels it manages).
|
19 | 19 | //!
|
| 20 | +//! [`find_route`]: crate::routing::router::find_route |
20 | 21 |
|
21 | 22 | use bitcoin::blockdata::block::BlockHeader;
|
22 | 23 | use bitcoin::blockdata::transaction::Transaction;
|
@@ -1777,12 +1778,14 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
|
1777 | 1778 | self.list_channels_with_filter(|_| true)
|
1778 | 1779 | }
|
1779 | 1780 |
|
1780 |
| - /// Gets the list of usable channels, in random order. Useful as an argument to |
1781 |
| - /// get_route to ensure non-announced channels are used. |
| 1781 | + /// Gets the list of usable channels, in random order. Useful as an argument to [`find_route`] |
| 1782 | + /// to ensure non-announced channels are used. |
1782 | 1783 | ///
|
1783 | 1784 | /// These are guaranteed to have their [`ChannelDetails::is_usable`] value set to true, see the
|
1784 | 1785 | /// documentation for [`ChannelDetails::is_usable`] for more info on exactly what the criteria
|
1785 | 1786 | /// are.
|
| 1787 | + /// |
| 1788 | + /// [`find_route`]: crate::routing::router::find_route |
1786 | 1789 | pub fn list_usable_channels(&self) -> Vec<ChannelDetails> {
|
1787 | 1790 | // Note we use is_live here instead of usable which leads to somewhat confused
|
1788 | 1791 | // internal/external nomenclature, but that's ok cause that's probably what the user
|
@@ -3765,7 +3768,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
|
3765 | 3768 | .. } => {
|
3766 | 3769 | // we get a fail_malformed_htlc from the first hop
|
3767 | 3770 | // TODO: We'd like to generate a NetworkUpdate for temporary
|
3768 |
| - // failures here, but that would be insufficient as get_route |
| 3771 | + // failures here, but that would be insufficient as find_route |
3769 | 3772 | // generally ignores its view of our own channels as we provide them via
|
3770 | 3773 | // ChannelDetails.
|
3771 | 3774 | // TODO: For non-temporary failures, we really should be closing the
|
|
0 commit comments