Merge PR #2455: Print out all 3 public key encoding with gaiadebug

This commit is contained in:
Zaki Manian 2018-10-08 21:26:56 -07:00 committed by Christopher Goes
parent cd21427a7b
commit d6be4fcf69
1 changed files with 7 additions and 1 deletions

View File

@ -138,11 +138,17 @@ func runPubKeyCmd(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
consenusPub, err := sdk.Bech32ifyConsPub(pubKey)
if err != nil {
return err
}
fmt.Println("Address:", pubKey.Address())
fmt.Printf("Hex: %X\n", pubkeyBytes)
fmt.Println("JSON (base64):", string(pubKeyJSONBytes))
fmt.Println("Bech32 Acc:", accPub)
fmt.Println("Bech32 Val:", valPub)
fmt.Println("Bech32 Validator Operator:", valPub)
fmt.Println("Bech32 Validator Consensus:", consenusPub)
return nil
}