You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a random real-world-network-graph test for the router
This is the same code as was recently failing in our benchmarks,
adapted to use a random starting seed instead of a fixed one and
a smaller iteration to reduce runtime.
letmut d = File::open("net_graph-2021-02-12.bin").expect("Please fetch https://bitcoin.ninja/ldk-net_graph-879e309c128-2020-02-12.bin and place it at lightning/net_graph-2021-02-12.bin");
3851
+
letmut d = tests::get_route_file()
3852
+
.expect("Please fetch https://bitcoin.ninja/ldk-net_graph-879e309c128-2020-02-12.bin and place it at lightning/net_graph-2021-02-12.bin");
3767
3853
let graph = NetworkGraph::read(&mut d).unwrap();
3768
3854
3769
3855
// First, get 100 (source, destination) pairs for which route-getting actually succeeds...
@@ -3794,7 +3880,8 @@ mod benches {
3794
3880
3795
3881
#[bench]
3796
3882
fngenerate_mpp_routes(bench:&mutBencher){
3797
-
letmut d = File::open("net_graph-2021-02-12.bin").expect("Please fetch https://bitcoin.ninja/ldk-net_graph-879e309c128-2020-02-12.bin and place it at lightning/net_graph-2021-02-12.bin");
3883
+
letmut d = tests::get_route_file()
3884
+
.expect("Please fetch https://bitcoin.ninja/ldk-net_graph-879e309c128-2020-02-12.bin and place it at lightning/net_graph-2021-02-12.bin");
3798
3885
let graph = NetworkGraph::read(&mut d).unwrap();
3799
3886
3800
3887
// First, get 100 (source, destination) pairs for which route-getting actually succeeds...
0 commit comments