Merge pull request #195 from harmony-one/cli-180

[#180] Better error message for validator information not found
pull/197/head
Daniel Van Der Maden 5 years ago committed by GitHub
commit 1100d41b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Makefile
  2. 6
      cmd/subcommands/validator.go

@ -9,7 +9,6 @@ ldflags := -X main.version=v${version} -X main.commit=${commit}
ldflags += -X main.builtAt=${built_at} -X main.builtBy=${built_by}
cli := ./dist/hmy
upload-path-darwin := 's3://pub.harmony.one/release/darwin-x86_64/mainnet/hmy'
upload-path-darwin-version := 's3://pub.harmony.one/release/darwin-x86_64/mainnet/hmy_version'
upload-path-linux := 's3://pub.harmony.one/release/linux-x86_64/mainnet/hmy'
upload-path-linux-version := 's3://pub.harmony.one/release/linux-x86_64/mainnet/hmy_version'
@ -46,9 +45,8 @@ test-rpc:
# Notice assumes you have correct uploading credentials
upload-darwin:all
aws --profile upload s3 cp ./hmy ${upload-path-darwin}
./hmy version &> ./hmy_version
aws --profile upload s3 cp ./hmy_version ${upload-path-darwin-version}
# Only the linux build will upload the CLI version
upload-linux:static
aws --profile upload s3 cp ./hmy ${upload-path-linux}
./hmy version &> ./hmy_version

@ -43,7 +43,11 @@ var (
PreRunE: validateAddress,
RunE: func(cmd *cobra.Command, args []string) error {
noLatest = true
return request(rpc.Method.GetValidatorInformation, []interface{}{addr.address})
e := request(rpc.Method.GetValidatorInformation, []interface{}{addr.address})
if e != nil {
return fmt.Errorf("validator address not found: %s", addr.address)
}
return e
},
}, {
Use: "information-by-block-number",

Loading…
Cancel
Save