Dynamically check height in init.sh

This commit is contained in:
Simon Warta 2020-11-19 14:48:34 +01:00
parent 06abeee1d2
commit a4d59bf907

View File

@ -7,8 +7,7 @@ timeout 60 bash -c "until curl -s http://localhost:1319/node_info > /dev/null; d
# The chain is unreliable in the first second of its existence (https://gist.github.com/webmaster128/8175692d4af5e6c572fddda7a9ef437c)
sleep 1
echo "Waiting for height to be > 1 ..."
sleep 10
# timeout 20 bash -c "until test $(curl -s localhost:1319/blocks/latest | jq -r '.block.header.height // 0') -gt 1; do sleep 0.5; done"
timeout 20 bash -c "until [ \"\$( curl -s http://localhost:1319/blocks/latest | jq -r '.block.header.height // 0' )\" -gt 1 ]; do sleep 0.5; done"
echo "Okay, thank you for your patience."