diff --git a/cli/candidate_test.go b/cli/candidate_test.go index ffb0fd10b..ac175458b 100644 --- a/cli/candidate_test.go +++ b/cli/candidate_test.go @@ -82,7 +82,7 @@ func TestRegisterCandidate(t *testing.T) { e.Run(t, "neo-go", "query", "voter", "--rpc-endpoint", "http://"+e.RPC.Addr, validatorPriv.Address()) - e.checkNextLine(t, "^\\s*Voted:\\s+"+validatorPriv.Address()) + e.checkNextLine(t, "^\\s*Voted:\\s+"+validatorHex+"\\s+\\("+validatorPriv.Address()+"\\)$") e.checkNextLine(t, "^\\s*Amount\\s*:\\s*"+b.String()+"$") e.checkNextLine(t, "^\\s*Block\\s*:\\s*"+strconv.FormatUint(uint64(index), 10)) e.checkEOF(t) diff --git a/cli/query/query.go b/cli/query/query.go index 18ac8f0ba..17585d0a7 100644 --- a/cli/query/query.go +++ b/cli/query/query.go @@ -248,7 +248,7 @@ func queryVoter(ctx *cli.Context) error { } voted := "null" if st.VoteTo != nil { - voted = address.Uint160ToString(st.VoteTo.GetScriptHash()) + voted = fmt.Sprintf("%s (%s)", hex.EncodeToString(st.VoteTo.Bytes()), address.Uint160ToString(st.VoteTo.GetScriptHash())) } fmt.Fprintf(ctx.App.Writer, "\tVoted: %s\n", voted) fmt.Fprintf(ctx.App.Writer, "\tAmount : %s\n", fixedn.ToString(&st.Balance, int(dec)))