Add advance-epoch.sh script to localnet Docker images#795
Conversation
| # Wait for the Oasis Node to start. | ||
| while [[ ! -S ${OASIS_NODE_SOCKET} ]]; do sleep 1; done | ||
|
|
||
| old_epoch=`${OASIS_NODE_BINARY} control status -a unix:${OASIS_NODE_SOCKET} | jq '.consensus.latest_epoch'` |
There was a problem hiding this comment.
Maybe ensure that mock epoch backend is configured (I think this can be seen via control status iirc), and if mock backend is not used print a nice error to the user.
There was a problem hiding this comment.
I've checked and unfortunately that isn't exported in the control status :(
I can check the BEACON_BACKEND variable though -- if it's set and if it's set to anything other than mock, the error message will be printed, otherwise the start script assumes a mock backend.
There was a problem hiding this comment.
oh for some reason i thought we expose the consensus parameters. Maybe could check via oasis-cli network show?
But your suggestion is fine with me as well 👍
There was a problem hiding this comment.
In the control status output there's just the consensus backend (which is always tendermint) 🤷♂️
The check for the BEACON_BACKEND variable that I just added should work fine, since the startup script also uses that :)
(And it's much simpler than parsing output from the CLI.)
ccd41bc to
23c45ae
Compare
This PR adds a helper script to the localnet Docker images,
/advance-epoch.sh, which advances the mock epoch by 1 or by the argument given.