|
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::{Block, BlockHeader};
|
22 | 23 | use bitcoin::blockdata::transaction::Transaction;
|
@@ -1476,12 +1477,14 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
|
1476 | 1477 | self.list_channels_with_filter(|_| true)
|
1477 | 1478 | }
|
1478 | 1479 |
|
1479 |
| - /// Gets the list of usable channels, in random order. Useful as an argument to |
1480 |
| - /// get_route to ensure non-announced channels are used. |
| 1480 | + /// Gets the list of usable channels, in random order. Useful as an argument to [`find_route`] |
| 1481 | + /// to ensure non-announced channels are used. |
1481 | 1482 | ///
|
1482 | 1483 | /// These are guaranteed to have their [`ChannelDetails::is_usable`] value set to true, see the
|
1483 | 1484 | /// documentation for [`ChannelDetails::is_usable`] for more info on exactly what the criteria
|
1484 | 1485 | /// are.
|
| 1486 | + /// |
| 1487 | + /// [`find_route`]: crate::routing::router::find_route |
1485 | 1488 | pub fn list_usable_channels(&self) -> Vec<ChannelDetails> {
|
1486 | 1489 | // Note we use is_live here instead of usable which leads to somewhat confused
|
1487 | 1490 | // internal/external nomenclature, but that's ok cause that's probably what the user
|
@@ -3266,7 +3269,7 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
|
3266 | 3269 | .. } => {
|
3267 | 3270 | // we get a fail_malformed_htlc from the first hop
|
3268 | 3271 | // TODO: We'd like to generate a NetworkUpdate for temporary
|
3269 |
| - // failures here, but that would be insufficient as get_route |
| 3272 | + // failures here, but that would be insufficient as find_route |
3270 | 3273 | // generally ignores its view of our own channels as we provide them via
|
3271 | 3274 | // ChannelDetails.
|
3272 | 3275 | // TODO: For non-temporary failures, we really should be closing the
|
|
0 commit comments