Browse Source

Fix regtests (follow-up 0ebb6469ff)

Note: We should probably require the password in load_wallet,
and store it in memory as long as the wallet is loaded. In that
case, commands that currently require a password would no longer
require it if the wallet is loaded.
master
ThomasV 2 years ago
parent
commit
fc183e5143
  1. 28
      electrum/tests/regtest/regtest.sh

28
electrum/tests/regtest/regtest.sh

@ -127,7 +127,7 @@ if [[ $1 == "breach" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
channel=$($alice open_channel $bob_node 0.15)
channel=$($alice open_channel $bob_node 0.15 --password='')
new_blocks 3
wait_until_channel_open alice
request=$($bob add_request 0.01 -m "blah" | jq -r ".lightning_invoice")
@ -152,13 +152,13 @@ if [[ $1 == "backup" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
channel1=$($alice open_channel $bob_node 0.15)
channel1=$($alice open_channel $bob_node 0.15 --password='')
$alice setconfig use_recoverable_channels False
channel2=$($alice open_channel $bob_node 0.15)
channel2=$($alice open_channel $bob_node 0.15 --password='')
new_blocks 3
wait_until_channel_open alice
backup=$($alice export_channel_backup $channel2)
seed=$($alice getseed)
seed=$($alice getseed --password='')
$alice stop
mv /tmp/alice/regtest/wallets/default_wallet /tmp/alice/regtest/wallets/default_wallet.old
$alice -o restore "$seed"
@ -179,14 +179,14 @@ if [[ $1 == "backup_local_forceclose" ]]; then
echo "alice opens channel"
bob_node=$($bob nodeid)
$alice setconfig use_recoverable_channels False
channel=$($alice open_channel $bob_node 0.15)
channel=$($alice open_channel $bob_node 0.15 --password='')
new_blocks 3
wait_until_channel_open alice
backup=$($alice export_channel_backup $channel)
echo "local force close $channel"
$alice close_channel $channel --force
sleep 0.5
seed=$($alice getseed)
seed=$($alice getseed --password='')
$alice stop
mv /tmp/alice/regtest/wallets/default_wallet /tmp/alice/regtest/wallets/default_wallet.old
new_blocks 150
@ -202,7 +202,7 @@ if [[ $1 == "collaborative_close" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
channel=$($alice open_channel $bob_node 0.15)
channel=$($alice open_channel $bob_node 0.15 --password='')
new_blocks 3
wait_until_channel_open alice
echo "alice closes channel"
@ -214,7 +214,7 @@ if [[ $1 == "swapserver_success" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
channel=$($alice open_channel $bob_node 0.15)
channel=$($alice open_channel $bob_node 0.15 --password='')
new_blocks 3
wait_until_channel_open alice
echo "alice initiates swap"
@ -234,7 +234,7 @@ if [[ $1 == "swapserver_refund" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
channel=$($alice open_channel $bob_node 0.15)
channel=$($alice open_channel $bob_node 0.15 --password='')
new_blocks 3
wait_until_channel_open alice
echo "alice initiates swap"
@ -256,7 +256,7 @@ if [[ $1 == "extract_preimage" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
$alice open_channel $bob_node 0.15
$alice open_channel $bob_node 0.15 --password=''
new_blocks 3
wait_until_channel_open alice
chan_id=$($alice list_channels | jq -r ".[0].channel_point")
@ -287,7 +287,7 @@ if [[ $1 == "redeem_htlcs" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
$alice open_channel $bob_node 0.15
$alice open_channel $bob_node 0.15 --password=''
new_blocks 3
wait_until_channel_open alice
# alice pays bob
@ -329,7 +329,7 @@ if [[ $1 == "breach_with_unspent_htlc" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
channel=$($alice open_channel $bob_node 0.15)
channel=$($alice open_channel $bob_node 0.15 --password='')
new_blocks 3
wait_until_channel_open alice
echo "alice pays bob"
@ -358,7 +358,7 @@ if [[ $1 == "breach_with_spent_htlc" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
channel=$($alice open_channel $bob_node 0.15)
channel=$($alice open_channel $bob_node 0.15 --password='')
new_blocks 3
wait_until_channel_open alice
echo "alice pays bob"
@ -422,7 +422,7 @@ if [[ $1 == "watchtower" ]]; then
wait_for_balance alice 1
echo "alice opens channel"
bob_node=$($bob nodeid)
channel=$($alice open_channel $bob_node 0.15)
channel=$($alice open_channel $bob_node 0.15 --password='')
echo "channel outpoint: $channel"
new_blocks 3
wait_until_channel_open alice

Loading…
Cancel
Save