Check for data dir before initializing a new chain
This commit is contained in:
parent
52e8d322fa
commit
77d188dd97
@ -10,7 +10,7 @@ LOGLEVEL=${LOGLEVEL:-"info"}
|
|||||||
|
|
||||||
input_genesis_file=${GENESIS_FILE}
|
input_genesis_file=${GENESIS_FILE}
|
||||||
|
|
||||||
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data" ]; then
|
||||||
# validate dependencies are installed
|
# validate dependencies are installed
|
||||||
command -v jq > /dev/null 2>&1 || {
|
command -v jq > /dev/null 2>&1 || {
|
||||||
echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"
|
echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"
|
||||||
@ -103,6 +103,9 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
# Run this to allow requests from any origin
|
# Run this to allow requests from any origin
|
||||||
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
|
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
|
||||||
|
|
||||||
|
# Allow multiple node connections from same IP
|
||||||
|
sed -i 's/allow_duplicate_ip.*$/allow_duplicate_ip = true/' $HOME/.laconicd/config/config.toml
|
||||||
|
|
||||||
# Enable telemetry (prometheus metrics: http://localhost:1317/metrics?format=prometheus)
|
# Enable telemetry (prometheus metrics: http://localhost:1317/metrics?format=prometheus)
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
sed -i '' 's/enabled = false/enabled = true/g' $HOME/.laconicd/config/app.toml
|
sed -i '' 's/enabled = false/enabled = true/g' $HOME/.laconicd/config/app.toml
|
||||||
|
@ -53,9 +53,9 @@ func GetCmdCommitBid() *cobra.Command {
|
|||||||
if chainId == "" {
|
if chainId == "" {
|
||||||
// Take from config if not provided
|
// Take from config if not provided
|
||||||
chainId = clientCtx.ChainID
|
chainId = clientCtx.ChainID
|
||||||
if chainId == "" {
|
}
|
||||||
return fmt.Errorf("--chain-id required")
|
if chainId == "" {
|
||||||
}
|
return fmt.Errorf("--chain-id required")
|
||||||
}
|
}
|
||||||
|
|
||||||
bidAmount, err := sdk.ParseCoinNormalized(args[1])
|
bidAmount, err := sdk.ParseCoinNormalized(args[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user