From 1ccfbef4e7bbccaa0e666f48afc83f235b07a5b9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 18 Apr 2019 16:05:09 +0930 Subject: [PATCH] tools/bench-gossipd.sh: make sure we wait for gossipd to startup sync. It can take a while if bitcoind has the regtest chain, and grossly distorts our benchmarks! Reported-by: Joe Netti Signed-off-by: Rusty Russell --- tools/bench-gossipd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/bench-gossipd.sh b/tools/bench-gossipd.sh index c37bd2b23..cf1d3461c 100755 --- a/tools/bench-gossipd.sh +++ b/tools/bench-gossipd.sh @@ -23,6 +23,8 @@ wait_for_start() exit 1 fi done + # Wait for it to catch up with bitcoind. + while [ "$($LCLI1 -H getinfo 2>/dev/null | grep '^blockheight=' | cut -d= -f2)" != "$(bitcoin-cli -regtest getblockcount)" ]; do sleep 1; done echo "$ID" }