]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Consistently pass `DefaultRouter::new` `Default` scoring parameters 2024-08-default-for-bindings
authorMatt Corallo <git@bluematt.me>
Mon, 12 Aug 2024 18:29:59 +0000 (18:29 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 20 Aug 2024 14:33:42 +0000 (14:33 +0000)
In 26c1639ab69d6780c97a118f09e42cb42304088a (and later in
50c55dcf32466e3ccf17acea50697fc664950deb and
fb693ecbf81be0146a81cc7fd95342c403eacaa9) we switched to using
`Default::default()` to initialize `()` for scoring parameters in
tests. One `()`s slipped back in recently, which we replace here.

lightning/src/util/test_utils.rs

index 45e8c081a7bbcdc6ac32887bc34ab44a8c896202..4de1fa013c5ba947afa913a74c8f99a9e3948630 100644 (file)
@@ -130,7 +130,7 @@ impl<'a> TestRouter<'a> {
        ) -> Self {
                let entropy_source = Arc::new(RandomBytes::new([42; 32]));
                Self {
-                       router: DefaultRouter::new(network_graph.clone(), logger, entropy_source, scorer, ()),
+                       router: DefaultRouter::new(network_graph.clone(), logger, entropy_source, scorer, Default::default()),
                        network_graph,
                        next_routes: Mutex::new(VecDeque::new()),
                        next_blinded_payment_paths: Mutex::new(Vec::new()),