diff --git a/tests/regtest/regtest.sh b/tests/regtest/regtest.sh index 19f420e1b..f85ffc172 100755 --- a/tests/regtest/regtest.sh +++ b/tests/regtest/regtest.sh @@ -578,11 +578,17 @@ if [[ $1 == "fw_fail_htlc" ]]; then exit 1 fi $carol stop - $bob close_channel $chan_id2 --force + ctx_id=$($bob close_channel $chan_id2 --force) new_blocks 1 sleep 1 new_blocks 150 # cltv before bob can broadcast - sleep 5 # give bob time to process blocks and broadcast + # index of htlc + if [ $TEST_ANCHOR_CHANNELS = True ] ; then + output_index=2 + else + output_index=0 + fi + wait_until_spent $ctx_id $output_index new_blocks 1 # confirm 2nd stage. sleep 1 new_blocks 100 # deep