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 24, 2024
1 parent f778377 commit 7c75ca4
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 @@ -168,7 +168,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 @@ -180,7 +180,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 @@ -195,7 +195,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 7c75ca4

Please sign in to comment.