electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 2fed2184526e16fda81dc9d9675788426c35543c
parent 8fb79196baa16e6ba52a7547adff2edd0c9e5f62
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 12 May 2020 09:22:39 +0200

follow-up prev commit (fix regtest)

Diffstat:
Melectrum/tests/regtest/regtest.sh | 20++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/electrum/tests/regtest/regtest.sh b/electrum/tests/regtest/regtest.sh @@ -110,10 +110,10 @@ if [[ $1 == "forwarding" ]]; then echo "mining 3 blocks" new_blocks 3 sleep 10 # time for channelDB - request=$($carol add_lightning_request 0.0001 -m "blah") + request=$($carol add_lightning_request 0.0001 -m "blah" | jq -r ".invoice") $carol setconfig test_fail_malformed_htlc true $alice lnpay $request - request2=$($carol add_lightning_request 0.0001 -m "blah") + request2=$($carol add_lightning_request 0.0001 -m "blah" | jq -r ".invoice") $carol setconfig test_fail_malformed_htlc false $alice lnpay $request2 carol_balance=$($carol list_channels | jq -r '.[0].local_balance') @@ -138,12 +138,12 @@ if [[ $1 == "breach" ]]; then channel=$($alice open_channel $bob_node 0.15) new_blocks 3 wait_until_channel_open alice - request=$($bob add_lightning_request 0.01 -m "blah") + request=$($bob add_lightning_request 0.01 -m "blah" | jq -r ".invoice") echo "alice pays" $alice lnpay $request sleep 2 ctx=$($alice get_channel_ctx $channel --iknowwhatimdoing) - request=$($bob add_lightning_request 0.01 -m "blah2") + request=$($bob add_lightning_request 0.01 -m "blah2" | jq -r ".invoice") echo "alice pays again" $alice lnpay $request echo "alice broadcasts old ctx" @@ -167,7 +167,7 @@ if [[ $1 == "extract_preimage" ]]; then wait_until_channel_open alice chan_id=$($alice list_channels | jq -r ".[0].channel_point") # alice pays bob - invoice=$($bob add_lightning_request 0.04 -m "test") + invoice=$($bob add_lightning_request 0.04 -m "test" | jq -r ".invoice") screen -S alice_payment -dm -L -Logfile /tmp/alice/screen.log $alice lnpay $invoice --timeout=600 sleep 1 unsettled=$($alice list_channels | jq '.[] | .local_unsettled_sent') @@ -197,7 +197,7 @@ if [[ $1 == "redeem_htlcs" ]]; then new_blocks 3 wait_until_channel_open alice # alice pays bob - invoice=$($bob add_lightning_request 0.04 -m "test") + invoice=$($bob add_lightning_request 0.04 -m "test" | jq -r ".invoice") $alice lnpay $invoice --timeout=1 || true unsettled=$($alice list_channels | jq '.[] | .local_unsettled_sent') if [[ "$unsettled" == "0" ]]; then @@ -239,7 +239,7 @@ if [[ $1 == "breach_with_unspent_htlc" ]]; then new_blocks 3 wait_until_channel_open alice echo "alice pays bob" - invoice=$($bob add_lightning_request 0.04 -m "test") + invoice=$($bob add_lightning_request 0.04 -m "test" | jq -r ".invoice") $alice lnpay $invoice --timeout=1 || true unsettled=$($alice list_channels | jq '.[] | .local_unsettled_sent') if [[ "$unsettled" == "0" ]]; then @@ -268,7 +268,7 @@ if [[ $1 == "breach_with_spent_htlc" ]]; then new_blocks 3 wait_until_channel_open alice echo "alice pays bob" - invoice=$($bob add_lightning_request 0.04 -m "test") + invoice=$($bob add_lightning_request 0.04 -m "test" | jq -r ".invoice") $alice lnpay $invoice --timeout=1 || true ctx=$($alice get_channel_ctx $channel --iknowwhatimdoing) unsettled=$($alice list_channels | jq '.[] | .local_unsettled_sent') @@ -331,11 +331,11 @@ if [[ $1 == "watchtower" ]]; then new_blocks 3 wait_until_channel_open alice echo "alice pays bob" - invoice1=$($bob add_lightning_request 0.01 -m "invoice1") + invoice1=$($bob add_lightning_request 0.01 -m "invoice1" | jq -r ".invoice") $alice lnpay $invoice1 ctx=$($alice get_channel_ctx $channel --iknowwhatimdoing) echo "alice pays bob again" - invoice2=$($bob add_lightning_request 0.01 -m "invoice2") + invoice2=$($bob add_lightning_request 0.01 -m "invoice2" | jq -r ".invoice") $alice lnpay $invoice2 msg="waiting until watchtower is synchronized" while watchtower_ctn=$($carol get_watchtower_ctn $channel) && [ $watchtower_ctn != "3" ]; do