Update net_graph used for benchmarks to use new ser format. 2021-05-really-tlv-ser
authorMatt Corallo <git@bluematt.me>
Thu, 27 May 2021 00:12:30 +0000 (00:12 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 27 May 2021 21:46:38 +0000 (21:46 +0000)
.github/workflows/build.yml
lightning/src/routing/router.rs

index ad9d875214be579eb00c5f4db3c74ccdaf5c7f14..61e961690fe68b0491ea5b8be556aa658d257f53 100644 (file)
@@ -143,13 +143,13 @@ jobs:
         id: cache-graph
         uses: actions/cache@v2
         with:
-          path: lightning/net_graph-2021-02-12.bin
-          key: ldk-net_graph-05f0c5a0d772-2020-02-12.bin
+          path: lightning/net_graph-2021-05-27.bin
+          key: ldk-net_graph-45d86ead641d-2021-05-27.bin
       - name: Fetch routing graph snapshot
         if: steps.cache-graph.outputs.cache-hit != 'true'
         run: |
-          wget -O lightning/net_graph-2021-02-12.bin https://bitcoin.ninja/ldk-net_graph-05f0c5a0d772-2020-02-12.bin
-          if [ "$(sha256sum lightning/net_graph-2021-02-12.bin | awk '{ print $1 }')" != "7116fca78551fedc714a604cec0ad1ca66caa77bb4d0051290258e7a10e0c6e7" ]; then
+          wget -O lightning/net_graph-2021-05-27.bin https://bitcoin.ninja/ldk-net_graph-45d86ead641d-2021-05-27.bin
+          if [ "$(sha256sum lightning/net_graph-2021-05-27.bin | awk '{ print $1 }')" != "3d6261187cfa583255d978efb908b51c2f4dc4ad9a7160cd2c5263c9a4830121" ]; then
             echo "Bad hash"
             exit 1
           fi
index 1f77681bf06b673de4d44e23f4050ceb6b1beefa..7688e70b36b4710a4bcd41d960a97a51d04fa2a6 100644 (file)
@@ -3857,8 +3857,8 @@ mod tests {
        use util::ser::Readable;
        /// Tries to open a network graph file, or panics with a URL to fetch it.
        pub(super) fn get_route_file() -> Result<std::fs::File, std::io::Error> {
-               let res = File::open("net_graph-2021-02-12.bin") // By default we're run in RL/lightning
-                       .or_else(|_| File::open("lightning/net_graph-2021-02-12.bin")) // We may be run manually in RL/
+               let res = File::open("net_graph-2021-05-27.bin") // By default we're run in RL/lightning
+                       .or_else(|_| File::open("lightning/net_graph-2021-05-27.bin")) // We may be run manually in RL/
                        .or_else(|_| { // Fall back to guessing based on the binary location
                                // path is likely something like .../rust-lightning/target/debug/deps/lightning-...
                                let mut path = std::env::current_exe().unwrap();
@@ -3867,7 +3867,7 @@ mod tests {
                                path.pop(); // debug
                                path.pop(); // target
                                path.push("lightning");
-                               path.push("net_graph-2021-02-12.bin");
+                               path.push("net_graph-2021-05-27.bin");
                                eprintln!("{}", path.to_str().unwrap());
                                File::open(path)
                        });
@@ -3890,7 +3890,7 @@ mod tests {
                let mut d = match get_route_file() {
                        Ok(f) => f,
                        Err(_) => {
-                               eprintln!("Please fetch https://bitcoin.ninja/ldk-net_graph-05f0c5a0d772-2020-02-12.bin and place it at lightning/net_graph-2021-02-12.bin");
+                               eprintln!("Please fetch https://bitcoin.ninja/ldk-net_graph-45d86ead641d-2021-05-27.bin and place it at lightning/net_graph-2021-05-27.bin");
                                return;
                        },
                };
@@ -3917,7 +3917,7 @@ mod tests {
                let mut d = match get_route_file() {
                        Ok(f) => f,
                        Err(_) => {
-                               eprintln!("Please fetch https://bitcoin.ninja/ldk-net_graph-05f0c5a0d772-2020-02-12.bin and place it at lightning/net_graph-2021-02-12.bin");
+                               eprintln!("Please fetch https://bitcoin.ninja/ldk-net_graph-45d86ead641d-2021-05-27.bin and place it at lightning/net_graph-2021-05-27.bin");
                                return;
                        },
                };
@@ -3955,7 +3955,7 @@ mod benches {
        #[bench]
        fn generate_routes(bench: &mut Bencher) {
                let mut d = tests::get_route_file()
-                       .expect("Please fetch https://bitcoin.ninja/ldk-net_graph-05f0c5a0d772-2020-02-12.bin and place it at lightning/net_graph-2021-02-12.bin");
+                       .expect("Please fetch https://bitcoin.ninja/ldk-net_graph-45d86ead641d-2021-05-27.bin and place it at lightning/net_graph-2021-05-27.bin");
                let graph = NetworkGraph::read(&mut d).unwrap();
 
                // First, get 100 (source, destination) pairs for which route-getting actually succeeds...
@@ -3987,7 +3987,7 @@ mod benches {
        #[bench]
        fn generate_mpp_routes(bench: &mut Bencher) {
                let mut d = tests::get_route_file()
-                       .expect("Please fetch https://bitcoin.ninja/ldk-net_graph-05f0c5a0d772-2020-02-12.bin and place it at lightning/net_graph-2021-02-12.bin");
+                       .expect("Please fetch https://bitcoin.ninja/ldk-net_graph-45d86ead641d-2021-05-27.bin and place it at lightning/net_graph-2021-05-27.bin");
                let graph = NetworkGraph::read(&mut d).unwrap();
 
                // First, get 100 (source, destination) pairs for which route-getting actually succeeds...