Skip to content

Commit 2d1af50

Browse files
committed
[bindings] Move additional score params from &() to Default
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.
1 parent ae1ade4 commit 2d1af50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/util/test_utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl<'a> Router for TestRouter<'a> {
151151
details: first_hops[idx],
152152
payer_node_id: &node_id,
153153
});
154-
scorer.channel_penalty_msat(&candidate, usage, &());
154+
scorer.channel_penalty_msat(&candidate, usage, &Default::default());
155155
continue;
156156
}
157157
}
@@ -163,7 +163,7 @@ impl<'a> Router for TestRouter<'a> {
163163
info: directed,
164164
short_channel_id: hop.short_channel_id,
165165
});
166-
scorer.channel_penalty_msat(&candidate, usage, &());
166+
scorer.channel_penalty_msat(&candidate, usage, &Default::default());
167167
} else {
168168
let target_node_id = NodeId::from_pubkey(&hop.pubkey);
169169
let route_hint = RouteHintHop {
@@ -178,7 +178,7 @@ impl<'a> Router for TestRouter<'a> {
178178
hint: &route_hint,
179179
target_node_id: &target_node_id,
180180
});
181-
scorer.channel_penalty_msat(&candidate, usage, &());
181+
scorer.channel_penalty_msat(&candidate, usage, &Default::default());
182182
}
183183
prev_hop_node = &hop.pubkey;
184184
}

0 commit comments

Comments
 (0)