regtest: increase timeouts 30s -> 120s

I suspect the timeouts are a bit too short for the slow ci machine.
This commit is contained in:
f321x
2026-04-22 18:00:52 +02:00
parent 36e9f185d2
commit 14f202941e
+6 -6
View File
@@ -22,7 +22,7 @@ function wait_until_htlcs_settled()
{
msg="wait until $1's local_unsettled_sent is zero"
cmd="./run_electrum --regtest -D /tmp/$1"
declare -i timeout_sec=30
declare -i timeout_sec=120
declare -i elapsed_sec=0
while unsettled=$($cmd list_channels | jq '.[] | .local_unsettled_sent') && [ $unsettled != "0" ]; do
@@ -44,7 +44,7 @@ function wait_for_balance()
{
msg="wait until $1's balance reaches $2"
cmd="./run_electrum --regtest -D /tmp/$1"
declare -i timeout_sec=30
declare -i timeout_sec=120
declare -i elapsed_sec=0
while balance=$($cmd getbalance | jq '[.confirmed, .unconfirmed] | to_entries | map(select(.value != null).value) | map(tonumber) | add ') && (( $(echo "$balance < $2" | bc -l) )); do
@@ -65,7 +65,7 @@ function wait_until_channel_open()
{
msg="wait until $1 sees channel open"
cmd="./run_electrum --regtest -D /tmp/$1"
declare -i timeout_sec=30
declare -i timeout_sec=120
declare -i elapsed_sec=0
while channel_state=$($cmd list_channels | jq '.[0] | .state' | tr -d '"') && [ $channel_state != "OPEN" ]; do
@@ -86,7 +86,7 @@ function wait_until_channel_closed()
{
msg="wait until $1 sees channel closed"
cmd="./run_electrum --regtest -D /tmp/$1"
declare -i timeout_sec=30
declare -i timeout_sec=120
declare -i elapsed_sec=0
while [[ $($cmd list_channels | jq '.[0].state' | tr -d '"') != "CLOSED" ]]; do
@@ -107,7 +107,7 @@ function wait_until_preimage()
{
msg="wait until $1 has preimage for $2"
cmd="./run_electrum --regtest -D /tmp/$1"
declare -i timeout_sec=30
declare -i timeout_sec=120
declare -i elapsed_sec=0
while [[ $($cmd get_invoice $2 | jq '.preimage' | tr -d '"') == "null" ]]; do
@@ -127,7 +127,7 @@ function wait_until_preimage()
function wait_until_spent()
{
msg="wait until $1:$2 is spent"
declare -i timeout_sec=30
declare -i timeout_sec=120
declare -i elapsed_sec=0
while [[ $($bitcoin_cli gettxout $1 $2) ]]; do