-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic Stargate wasmd scripts #539
Conversation
scripts/wasmd/init.sh
Outdated
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@webmaster128 I think I'm doing something stupid here, but I can't get this line to work with the timeout
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, [
, the nice syntax for test
always needs a space before the end. Maybe an issue here?
# 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 localhost:1319/blocks/latest | jq -r '.block.header.height // 0') -gt 1 ]; do sleep 0.5; done" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that syntax before test
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, $(curl -s localhost:1319/blocks/latest | jq -r '.block.header.height // 0')
is executed only once and then the following runs:
timeout 20 bash -c "until test 1 -gt 1; do sleep 0.5; done"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a way to fix the script. I just wonder why we need min height 2 instead of min height 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the new ports to HACKING.md
scripts/wasmd/init.sh
Outdated
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, [
, the nice syntax for test
always needs a space before the end. Maybe an issue here?
# 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 localhost:1319/blocks/latest | jq -r '.block.header.height // 0') -gt 1 ]; do sleep 0.5; done" |
c4835e1
to
ac2bbb8
Compare
Part of #515