Skip to content

Commit

Permalink
[bindings] Move additional score params from &() to Default
Browse files Browse the repository at this point in the history
In 26c1639 (and later in
50c55dc) we switched to using
`Default::default()` to initialize `()` for scoring parameters in
tests. A number of `()`s slipped back in recently, which we replace
here.
  • Loading branch information
TheBlueMatt committed Jan 23, 2024
1 parent 33ada75 commit 0253d69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lightning/src/util/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl<'a> Router for TestRouter<'a> {
details: first_hops[idx],
payer_node_id: &node_id,
});
scorer.channel_penalty_msat(&candidate, usage, &());
scorer.channel_penalty_msat(&candidate, usage, &Default::default());
continue;
}
}
Expand All @@ -163,7 +163,7 @@ impl<'a> Router for TestRouter<'a> {
info: directed,
short_channel_id: hop.short_channel_id,
});
scorer.channel_penalty_msat(&candidate, usage, &());
scorer.channel_penalty_msat(&candidate, usage, &Default::default());
} else {
let target_node_id = NodeId::from_pubkey(&hop.pubkey);
let route_hint = RouteHintHop {
Expand All @@ -178,7 +178,7 @@ impl<'a> Router for TestRouter<'a> {
hint: &route_hint,
target_node_id: &target_node_id,
});
scorer.channel_penalty_msat(&candidate, usage, &());
scorer.channel_penalty_msat(&candidate, usage, &Default::default());
}
prev_hop_node = &hop.pubkey;
}
Expand Down

0 comments on commit 0253d69

Please sign in to comment.