Skip to content

Commit

Permalink
fix default POA
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Jul 3, 2024
1 parent 3a2a0ee commit ead3c55
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/spawn/new_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func init() {
newChain.Flags().String(FlagGithubOrg, "rollchains", "github organization")
newChain.Flags().String(FlagTokenDenom, "token", "bank token denomination")
newChain.Flags().StringSlice(FlagDisabled, []string{}, strings.Join(features, ","))
newChain.Flags().String(FlagConsensus, spawn.POA, strings.Join(consensus, ",")) // we default to POA later if not set
newChain.Flags().String(FlagConsensus, "", strings.Join(consensus, ",")) // must be set to nothing is nothing is set
newChain.Flags().Bool(FlagDebugging, false, "enable debugging")
newChain.Flags().Bool(FlagNoGit, false, "ignore git init")
newChain.Flags().Bool(FlagBypassPrompt, false, "bypass UI prompt")
Expand Down Expand Up @@ -115,6 +115,10 @@ var newChain = &cobra.Command{
consensus = items.String()
}
}
if len(consensus) == 0 {
consensus = spawn.POA // set the default if still none is provided
}

consensus = spawn.AliasName(consensus)
logger.Debug("Consensus selected", "consensus", consensus)

Expand Down

0 comments on commit ead3c55

Please sign in to comment.