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");
3853
+
letmut d = tests::get_route_file()
3854
+
.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");
3769
3855
let graph = NetworkGraph::read(&mut d).unwrap();
3770
3856
3771
3857
// First, get 100 (source, destination) pairs for which route-getting actually succeeds...
@@ -3796,7 +3882,8 @@ mod benches {
3796
3882
3797
3883
#[bench]
3798
3884
fngenerate_mpp_routes(bench:&mutBencher){
3799
-
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");
3885
+
letmut d = tests::get_route_file()
3886
+
.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");
3800
3887
let graph = NetworkGraph::read(&mut d).unwrap();
3801
3888
3802
3889
// First, get 100 (source, destination) pairs for which route-getting actually succeeds...
0 commit comments