From c70e1194a0c0492fee53b72577519eb365189de5 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Tue, 15 Apr 2025 11:49:07 +0200 Subject: [PATCH] scripts/bw-compat: use status server to determine if node is ready This commit adjusts the backwards compatability test in 2 ways: 1) we first set up the bitcoin backend before waiting for our network nodes to start. This is so that the nodes can sync to chain and become fully active during the `wait_for_nodes` call. 2) Then, in the `wait_for_node` helper, we use the status server response to determine if a node is ready instead of just waiting for `GetInfo` to return a response. This is because waiting for SERVER_ACTIVE is a more accurate signal that the node is ready to receive RPC calls. --- scripts/bw-compatibility-test/network.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/bw-compatibility-test/network.sh b/scripts/bw-compatibility-test/network.sh index 16749e460..98eca675b 100644 --- a/scripts/bw-compatibility-test/network.sh +++ b/scripts/bw-compatibility-test/network.sh @@ -60,7 +60,7 @@ wait_for_node() { echo -n "⌛ Waiting for $node to start (timeout: ${TIMEOUT}s)" - while ! $node getinfo 2>/dev/null | grep -q identity_pubkey; do + while ! $node state 2>/dev/null | grep -q SERVER_ACTIVE; do echo -n "." sleep 0.5 @@ -96,10 +96,10 @@ do_for() { # setup_network sets up the basic A <> B <> C <> D network. function setup_network() { - wait_for_nodes alice bob charlie dave - setup_bitcoin + wait_for_nodes alice bob charlie dave + do_for fund_node alice bob charlie dave mine 6