Skip to content

Commit c70e119

Browse files
committed
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.
1 parent ff6f98a commit c70e119

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/bw-compatibility-test/network.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ wait_for_node() {
6060

6161
echo -n "⌛ Waiting for $node to start (timeout: ${TIMEOUT}s)"
6262

63-
while ! $node getinfo 2>/dev/null | grep -q identity_pubkey; do
63+
while ! $node state 2>/dev/null | grep -q SERVER_ACTIVE; do
6464
echo -n "."
6565
sleep 0.5
6666

@@ -96,10 +96,10 @@ do_for() {
9696

9797
# setup_network sets up the basic A <> B <> C <> D network.
9898
function setup_network() {
99-
wait_for_nodes alice bob charlie dave
100-
10199
setup_bitcoin
102100

101+
wait_for_nodes alice bob charlie dave
102+
103103
do_for fund_node alice bob charlie dave
104104
mine 6
105105

0 commit comments

Comments
 (0)