Skip to content

Commit

Permalink
Add base_url in validator update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayashsatolia403 committed Dec 31, 2024
1 parent d70e847 commit ca9dde6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ var validatorUpdateCmd = &cobra.Command{
updateValidator.ServiceCharge = &sc
}

if flags.Changed("base_url") {
var baseURL string
if baseURL, err = flags.GetString("base_url"); err != nil {
log.Fatal(err)
}
updateValidator.BaseURL = &baseURL
}

if _, _, err = sdk.UpdateValidatorSettings(updateValidator); err != nil {
log.Fatal(err)
}
Expand All @@ -189,6 +197,7 @@ func init() {

buf := validatorUpdateCmd.Flags()
buf.String("validator_id", "", "validator ID, required")
buf.String("base_url", "", "Base url, optional")
buf.Float64("min_stake", 0.0, "update min_stake, optional")
buf.Float64("max_stake", 0.0, "update max_stake, optional")
buf.Int("num_delegates", 0, "update num_delegates, optional")
Expand Down

0 comments on commit ca9dde6

Please sign in to comment.