File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ use prelude::*;
22
22
23
23
/// Finds a route from us to the given `destination` node.
24
24
/// If we have private channels, it may be useful to fill in `first_hops` with the results from
25
- /// [`ChannelManager::list_usable_channels`].
25
+ /// [`ChannelManager::list_usable_channels`]. If `first_hops` is not filled in, connected peers
26
+ /// without public channels will not be forwarded over.
26
27
///
27
28
/// [`ChannelManager::list_usable_channels`]: crate::ln::channelmanager::ChannelManager::list_usable_channels
28
29
pub fn find_path < L : Deref , GL : Deref > (
@@ -99,6 +100,8 @@ struct PathBuildingHop {
99
100
impl PartialOrd for PathBuildingHop {
100
101
fn partial_cmp ( & self , other : & Self ) -> Option < cmp:: Ordering > {
101
102
// We need a min-heap, whereas `BinaryHeap`s are a max-heap, so compare the costs in reverse.
103
+ // TODO: randomize which node is selected if they are equal-cost. Currently there is an
104
+ // incentive to grind lower node ids to attract more message forwards.
102
105
other. cost . partial_cmp ( & self . cost )
103
106
}
104
107
}
You can’t perform that action at this time.
0 commit comments