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.
This commit is contained in:
Elle Mouton
2025-04-15 11:49:07 +02:00
parent ff6f98a818
commit c70e1194a0

View File

@@ -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