Skip to content

Commit dcffefa

Browse files
committed
Update missed references to get_route in docs
1 parent 8c5ca95 commit dcffefa

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

ARCH.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ channel steps forward.
1212

1313
There are two additional important structures that you may use either on the same device
1414
as the `ChannelManager` or on a separate one. `NetGraphMsgHandler` handles receiving channel
15-
and node announcements, which are then used to calculate routes by `get_route` for sending payments.
16-
`PeerManager` handles the authenticated and encrypted communication protocol,
15+
and node announcements, which are then used to calculate routes by `find_route` for sending
16+
payments. `PeerManager` handles the authenticated and encrypted communication protocol,
1717
monitoring for liveness of peers, routing messages to `ChannelManager` and `NetGraphMsgHandler`
1818
instances directly, and receiving messages from them via the `EventsProvider` interface.
1919

lightning/src/ln/channelmanager.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
//! responsible for tracking which channels are open, HTLCs are in flight and reestablishing those
1414
//! upon reconnect to the relevant peer(s).
1515
//!
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
1717
//! on-chain transactions (it only monitors the chain to watch for any force-closes that might
1818
//! imply it needs to fail HTLCs/payments/channels it manages).
1919
//!
20+
//! [`find_route`]: crate::routing::router::find_route
2021
2122
use bitcoin::blockdata::block::BlockHeader;
2223
use bitcoin::blockdata::transaction::Transaction;
@@ -1777,12 +1778,14 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
17771778
self.list_channels_with_filter(|_| true)
17781779
}
17791780

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.
17821783
///
17831784
/// These are guaranteed to have their [`ChannelDetails::is_usable`] value set to true, see the
17841785
/// documentation for [`ChannelDetails::is_usable`] for more info on exactly what the criteria
17851786
/// are.
1787+
///
1788+
/// [`find_route`]: crate::routing::router::find_route
17861789
pub fn list_usable_channels(&self) -> Vec<ChannelDetails> {
17871790
// Note we use is_live here instead of usable which leads to somewhat confused
17881791
// 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
37653768
.. } => {
37663769
// we get a fail_malformed_htlc from the first hop
37673770
// 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
37693772
// generally ignores its view of our own channels as we provide them via
37703773
// ChannelDetails.
37713774
// TODO: For non-temporary failures, we really should be closing the

0 commit comments

Comments
 (0)