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

go-kosu: make init a subcommand instead of a flag #191

Merged
merged 3 commits into from Jul 30, 2019

Conversation

@hrharder
Copy link
Member

hrharder commented Jul 26, 2019

Overview

Makes --init a subcommand instead of a flag.

For example to start a node:

  • Before:
    # does both -- sometimes not wanted if we need to update config prior to start
    kosud --init
  • After:
    # initializes home dir
    kosud init
    
    # start the node
    kosud

Rationale

There are cases where we want to initialize our directory (generate config and private keys) before we start the node. In the current implementation, the node can only be initialized if it is also started at the same time.

This way, we can generate our keys and config, and then update our config before we start the node. An example would be when setting up a production validator, we need to generate our keys and config before we start the node to set up the proper sentry infrastructure.

Notes

  • Also add some aliases for other flags
@hrharder hrharder requested a review from gchaincl Jul 26, 2019
hrharder added 2 commits Jul 26, 2019
@gchaincl gchaincl merged commit 71273cb into master Jul 30, 2019
1 check passed
1 check passed
continuous-integration/drone/pr Build is passing
Details
@gchaincl gchaincl deleted the go-kosu/init-subcommand branch Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.