Conversation
When the --stake-owner flag is not set, we can read the stake owner address from the config key file. This script will prompt to pick from available config files and will fetch the address automatically.
nkuba
suggested changes
Aug 19, 2022
nkuba
reviewed
Aug 19, 2022
nkuba
suggested changes
Aug 22, 2022
| fi | ||
| done | ||
|
|
||
| key_file_path=$(awk '/keyFile ?=(.*)$/{print $3}' $CONFIG_FILE_PATH | xargs) |
Member
There was a problem hiding this comment.
Let's support both KeyFile and keyFile as the TOML configuration file is not strict about properties cases.
Suggested change
| key_file_path=$(awk '/keyFile ?=(.*)$/{print $3}' $CONFIG_FILE_PATH | xargs) | |
| key_file_path=$(awk '/[k|K]eyFile ?=(.*)$/{print $3}' $CONFIG_FILE_PATH | xargs) |
nkuba
approved these changes
Aug 22, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #3135
Depends on #3148
In this PR we add an option to select the config file during
initialze.shscript which will prompt to pick the config file and will fetch the stake owner address from the key file.Now you can simply run
scripts/initialize.shwithout providing--stake-owner <address>