From 5f482bf9be378081ce1ac513633230335ee69604 Mon Sep 17 00:00:00 2001 From: Jonathan Zernik Date: Mon, 21 Sep 2020 01:00:48 -0700 Subject: [PATCH] Fix ipv6 in lnd docker itest (#256) * Fix ipv6 in lnd docker itest * Clean up itest.sh --- itests/docker-compose.yml | 4 ++++ itests/run_itest.sh | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/itests/docker-compose.yml b/itests/docker-compose.yml index 59b895d0..373fe3f4 100644 --- a/itests/docker-compose.yml +++ b/itests/docker-compose.yml @@ -58,6 +58,8 @@ services: - test_lnd_client_dir:/root/.lnd links: - "btcd:btcd" + sysctls: + - net.ipv6.conf.all.disable_ipv6=0 entrypoint: ["./start-lnd.sh"] lnd_server: @@ -74,6 +76,8 @@ services: - test_lnd_server_dir:/root/.lnd links: - "btcd:blockchain" + sysctls: + - net.ipv6.conf.all.disable_ipv6=0 entrypoint: ["./start-lnd.sh"] sqkserver: diff --git a/itests/run_itest.sh b/itests/run_itest.sh index 7283e6cd..341f4d43 100755 --- a/itests/run_itest.sh +++ b/itests/run_itest.sh @@ -14,12 +14,21 @@ function mine_blocks { cd itests docker-compose down --volumes -docker-compose build +# docker-compose build docker-compose up -d # Initialize the blockchain with miner rewards going to the test client. -sleep 10 -client_address=$(docker exec -it test_lnd_client lncli --network=simnet newaddress np2wkh | jq .address -r) + +client_address="" +while [ "$client_address" = "" ] +do + new_address_output=$(docker exec -it test_lnd_client lncli --network=simnet newaddress np2wkh) + echo "new_address_output:" + echo $new_address_output + client_address=$(echo $new_address_output | jq .address -r) + sleep 10 +done + MINING_ADDRESS=$client_address docker-compose up -d btcd echo "Mining 400 blocks to address: $client_address ..." docker-compose run btcctl generate 400