|
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 [`find_route`] for that) nor does it manage constructing |
| 16 | +//! It does not manage routing logic (see [`Router`] 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 | | -//! |
20 | | -//! [`find_route`]: crate::routing::router::find_route |
21 | 19 |
|
22 | 20 | use bitcoin::blockdata::block::BlockHeader; |
23 | 21 | use bitcoin::blockdata::transaction::Transaction; |
@@ -1775,14 +1773,12 @@ where |
1775 | 1773 | self.list_channels_with_filter(|_| true) |
1776 | 1774 | } |
1777 | 1775 |
|
1778 | | - /// Gets the list of usable channels, in random order. Useful as an argument to [`find_route`] |
1779 | | - /// to ensure non-announced channels are used. |
| 1776 | + /// Gets the list of usable channels, in random order. Useful as an argument to |
| 1777 | + /// [`Router::find_route`] to ensure non-announced channels are used. |
1780 | 1778 | /// |
1781 | 1779 | /// These are guaranteed to have their [`ChannelDetails::is_usable`] value set to true, see the |
1782 | 1780 | /// documentation for [`ChannelDetails::is_usable`] for more info on exactly what the criteria |
1783 | 1781 | /// are. |
1784 | | - /// |
1785 | | - /// [`find_route`]: crate::routing::router::find_route |
1786 | 1782 | pub fn list_usable_channels(&self) -> Vec<ChannelDetails> { |
1787 | 1783 | // Note we use is_live here instead of usable which leads to somewhat confused |
1788 | 1784 | // internal/external nomenclature, but that's ok cause that's probably what the user |
@@ -4016,7 +4012,7 @@ where |
4016 | 4012 | None => None |
4017 | 4013 | }; |
4018 | 4014 |
|
4019 | | - let mut peer_state_opt = counterparty_node_id_opt.as_ref().map( |
| 4015 | + let peer_state_opt = counterparty_node_id_opt.as_ref().map( |
4020 | 4016 | |counterparty_node_id| per_peer_state.get(counterparty_node_id).map( |
4021 | 4017 | |peer_mutex| peer_mutex.lock().unwrap() |
4022 | 4018 | ) |
|
0 commit comments