Skip to content

Commit 190bca7

Browse files
committed
Spell out routing types to improve readability.
1 parent 1098208 commit 190bca7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/routing/router.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -796,11 +796,11 @@ where L::Target: Logger {
796796
// The main heap containing all candidate next-hops sorted by their score (max(A* fee,
797797
// htlc_minimum)). Ideally this would be a heap which allowed cheap score reduction instead of
798798
// adding duplicate entries when we find a better path to a given node.
799-
let mut targets = BinaryHeap::new();
799+
let mut targets: BinaryHeap<RouteGraphNode> = BinaryHeap::new();
800800

801801
// Map from node_id to information about the best current path to that node, including feerate
802802
// information.
803-
let mut dist = HashMap::with_capacity(network_nodes.len());
803+
let mut dist: HashMap<NodeId, PathBuildingHop> = HashMap::with_capacity(network_nodes.len());
804804

805805
// During routing, if we ignore a path due to an htlc_minimum_msat limit, we set this,
806806
// indicating that we may wish to try again with a higher value, potentially paying to meet an
@@ -1339,7 +1339,7 @@ where L::Target: Logger {
13391339
// traversing the graph and arrange the path out of what we found.
13401340
if node_id == our_node_id {
13411341
let mut new_entry = dist.remove(&our_node_id).unwrap();
1342-
let mut ordered_hops = vec!((new_entry.clone(), default_node_features.clone()));
1342+
let mut ordered_hops: Vec<(PathBuildingHop, NodeFeatures)> = vec!((new_entry.clone(), default_node_features.clone()));
13431343

13441344
'path_walk: loop {
13451345
let mut features_set = false;

0 commit comments

Comments
 (0)