Set min height to 1

This commit is contained in:
Simon Warta 2020-11-19 14:50:11 +01:00
parent a4d59bf907
commit ab5d578dba

View File

@ -6,8 +6,8 @@ echo "Waiting for blockchain and REST server to be available ..."
timeout 60 bash -c "until curl -s http://localhost:1319/node_info > /dev/null; do sleep 0.5; done"
# 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 ..."
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 "Waiting for height to be >= 1 ..."
timeout 20 bash -c "until [ \"\$( curl -s http://localhost:1319/blocks/latest | jq -r '.block.header.height // 0' )\" -ge 1 ]; do sleep 0.5; done"
echo "Okay, thank you for your patience."