Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sukantoraymond committed Oct 8, 2024
1 parent f2b24a0 commit 241b7f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/blockchaincmd/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ manage your Blockchain configurations and live deployments.`,
// subnet changeOwner
cmd.AddCommand(newChangeOwnerCmd())
// subnet changeWeight
cmd.AddCommand(newSetWeightCmd())
cmd.AddCommand(newChangeWeightCmd())
return cmd
}
2 changes: 1 addition & 1 deletion cmd/blockchaincmd/change_weight.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func newChangeWeightCmd() *cobra.Command {
Long: `The blockchain changeWeight command changes the weight of a Subnet Validator.
The Subnet has to be a Proof of Authority Subnet-Only Validator Subnet.`,
RunE: updateWeight,
RunE: setWeight,
Args: cobrautils.ExactArgs(1),
}
networkoptions.AddNetworkFlagsToCmd(cmd, &globalNetworkFlags, true, addValidatorSupportedNetworkOptions)
Expand Down
12 changes: 6 additions & 6 deletions cmd/blockchaincmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ configuration, pass the -f flag.`,
cmd.Flags().BoolVar(&createFlags.proofOfAuthority, "proof-of-authority", false, "use proof of authority for validator management")
cmd.Flags().BoolVar(&createFlags.proofOfStake, "proof-of-stake", false, "(coming soon) use proof of stake for validator management")
cmd.Flags().StringVar(&createFlags.poaValidatorManagerOwner, "poa-manager-owner", "", "EVM address that controls Validator Manager Owner (for Proof of Authority only)")
cmd.Flags().BoolVar(&nonSOV, "not-sov", false, "set to true if creating non-SOV (Subnet Only Validator) blockchain")
cmd.Flags().BoolVar(&sovereign, "sovereign", true, "set to false if creating non-sovereign blockchain")
return cmd
}

Expand Down Expand Up @@ -195,7 +195,7 @@ func createBlockchainConfig(cmd *cobra.Command, args []string) error {
return errors.New("flags --evm,--custom are mutually exclusive")
}

if nonSOV {
if !sovereign {
if createFlags.proofOfAuthority || createFlags.proofOfStake || createFlags.poaValidatorManagerOwner != "" {
return errSOVFlagsOnly
}
Expand Down Expand Up @@ -232,7 +232,7 @@ func createBlockchainConfig(cmd *cobra.Command, args []string) error {

sc := &models.Sidecar{}

if !nonSOV {
if sovereign {
if err = promptValidatorManagementType(app, sc); err != nil {
return err
}
Expand All @@ -242,7 +242,7 @@ func createBlockchainConfig(cmd *cobra.Command, args []string) error {
}

if vmType == models.SubnetEvm {
if !nonSOV {
if sovereign {
if sc.PoA() {
if createFlags.poaValidatorManagerOwner == "" {
createFlags.poaValidatorManagerOwner, err = getValidatorContractManagerAddr()
Expand Down Expand Up @@ -335,7 +335,7 @@ func createBlockchainConfig(cmd *cobra.Command, args []string) error {
vmVersion,
tokenSymbol,
true,
nonSOV,
sovereign,
); err != nil {
return err
}
Expand Down Expand Up @@ -365,7 +365,7 @@ func createBlockchainConfig(cmd *cobra.Command, args []string) error {
customVMBuildScript,
vmFile,
tokenSymbol,
nonSOV,
sovereign,
); err != nil {
return err
}
Expand Down

0 comments on commit 241b7f8

Please sign in to comment.