This commit is contained in:
Jack Zampolin 2019-01-28 11:37:05 -08:00
parent f494a92f92
commit 818fd16481
1 changed files with 7 additions and 2 deletions

View File

@ -25,15 +25,20 @@ func GetCmdQuerySigningInfo(storeName string, cdc *codec.Codec) *cobra.Command {
return err
}
key := slashing.GetValidatorSigningInfoKey(sdk.ConsAddress(pk.Address()))
consAddr := sdk.ConsAddress(pk.Address())
key := slashing.GetValidatorSigningInfoKey(consAddr)
res, err := cliCtx.QueryStore(key, storeName)
if err != nil {
return err
}
if len(res) == 0 {
return fmt.Errorf("Validator %s not found in slashing store", consAddr)
}
var signingInfo slashing.ValidatorSigningInfo
cdc.MustUnmarshalBinaryLengthPrefixed(res, signingInfo)
cdc.MustUnmarshalBinaryLengthPrefixed(res, &signingInfo)
return cliCtx.PrintOutput(signingInfo)
},
}