Skip to content
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

CNS-578: small fixes for init chain scripts #720

Merged
merged 7 commits into from
Aug 21, 2023

Conversation

oren-lava
Copy link
Collaborator

init_chain.sh - if jq is not installed, the script fails. Added jq installation
init_chain_commands.sh - added another wait_next_block after proposals to avoid statistical account sequence mismatch error

@oren-lava oren-lava requested a review from Yaroms August 17, 2023 11:09
@oren-lava oren-lava self-assigned this Aug 17, 2023
scripts/init_chain.sh Show resolved Hide resolved
scripts/useful_commands.sh Outdated Show resolved Hide resolved
@orenl-lava
Copy link
Contributor

while at it, I noticed the OS-specific logic for sed (twice) in there. it can be simplified by doing:

case "$(uname)" in
  Darwin)
    SED_INLINE="-i ''" ;;
  Linux)
    SED_INLINE="-i" ;;
  *)
    echo "unknown system: $(uname)"
    exit 1 ;;
esac

...
sed $SED_INLINE ...
...

with this only one copy of (each relevant) sed command is needed and is useful for both.
(disclaimer: not tested on Darwin, but the idea should be clear).

Yaroms
Yaroms previously approved these changes Aug 21, 2023
@Yaroms Yaroms merged commit f012f28 into main Aug 21, 2023
@Yaroms Yaroms deleted the CNS-578-small-fixes-for-init-chain-scripts branch August 21, 2023 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants