mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-03-15 15:39:09 +01:00
Update network graph sample used in benchmarks
This commit is contained in:
parent
c56265d225
commit
73576574a9
2 changed files with 8 additions and 8 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -143,13 +143,13 @@ jobs:
|
|||
id: cache-graph
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: lightning/net_graph-2021-05-27.bin
|
||||
key: ldk-net_graph-45d86ead641d-2021-05-27.bin
|
||||
path: lightning/net_graph-2021-05-31.bin
|
||||
key: ldk-net_graph-v0.0.15-2021-05-31.bin
|
||||
- name: Fetch routing graph snapshot
|
||||
if: steps.cache-graph.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
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
|
||||
wget -O lightning/net_graph-2021-05-31.bin https://bitcoin.ninja/ldk-net_graph-v0.0.15-2021-05-31.bin
|
||||
if [ "$(sha256sum lightning/net_graph-2021-05-31.bin | awk '{ print $1 }')" != "05a5361278f68ee2afd086cc04a1f927a63924be451f3221d380533acfacc303" ]; then
|
||||
echo "Bad hash"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -3907,8 +3907,8 @@ pub(crate) mod test_utils {
|
|||
use std::fs::File;
|
||||
/// Tries to open a network graph file, or panics with a URL to fetch it.
|
||||
pub(crate) fn get_route_file() -> Result<std::fs::File, &'static str> {
|
||||
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/
|
||||
let res = File::open("net_graph-2021-05-31.bin") // By default we're run in RL/lightning
|
||||
.or_else(|_| File::open("lightning/net_graph-2021-05-31.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();
|
||||
|
@ -3917,11 +3917,11 @@ pub(crate) mod test_utils {
|
|||
path.pop(); // debug
|
||||
path.pop(); // target
|
||||
path.push("lightning");
|
||||
path.push("net_graph-2021-05-27.bin");
|
||||
path.push("net_graph-2021-05-31.bin");
|
||||
eprintln!("{}", path.to_str().unwrap());
|
||||
File::open(path)
|
||||
})
|
||||
.map_err(|_| "Please fetch https://bitcoin.ninja/ldk-net_graph-45d86ead641d-2021-05-27.bin and place it at lightning/net_graph-2021-05-27.bin");
|
||||
.map_err(|_| "Please fetch https://bitcoin.ninja/ldk-net_graph-v0.0.15-2021-05-31.bin and place it at lightning/net_graph-2021-05-31.bin");
|
||||
#[cfg(require_route_graph_test)]
|
||||
return Ok(res.unwrap());
|
||||
#[cfg(not(require_route_graph_test))]
|
||||
|
|
Loading…
Add table
Reference in a new issue