Add a random per-path CLTV offset for privacy.
[rust-lightning] / lightning / src / ln / onion_route_tests.rs
index d67abeefdada29b6d38962737ea5282ee89e1d80..dbdb760924eb8d16c2ce142f649230f7711251ce 100644 (file)
@@ -610,10 +610,11 @@ macro_rules! get_phantom_route {
                                        }
                ])]);
                let scorer = test_utils::TestScorer::with_penalty(0);
+               let network_graph = $nodes[0].network_graph.read_only();
                (get_route(
-                       &$nodes[0].node.get_our_node_id(), &payment_params, $nodes[0].network_graph,
+                       &$nodes[0].node.get_our_node_id(), &payment_params, &network_graph,
                        Some(&$nodes[0].node.list_usable_channels().iter().collect::<Vec<_>>()),
-                       $amt, TEST_FINAL_CLTV, $nodes[0].logger, &scorer
+                       $amt, TEST_FINAL_CLTV, $nodes[0].logger, &scorer, &[0u8; 32]
                ).unwrap(), phantom_route_hint.phantom_scid)
        }
 }}