From 46d6fa0ecc9e52e2fac3a812c1c7808e5408f26f Mon Sep 17 00:00:00 2001 From: antstalepresh Date: Sat, 6 Feb 2021 01:21:22 +1000 Subject: [PATCH] fix simulation test, marshal json process --- x/gov/simulation/operations.go | 2 +- x/gov/types/vote.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index 3b87e8accd..8ce709da83 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -386,7 +386,7 @@ func operationSimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeepe return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err } - return simtypes.NewOperationMsg(msg, true, ""), nil, nil + return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil } } diff --git a/x/gov/types/vote.go b/x/gov/types/vote.go index baa61920a1..72fa0bfbf3 100644 --- a/x/gov/types/vote.go +++ b/x/gov/types/vote.go @@ -1,13 +1,12 @@ package types import ( + "encoding/json" "fmt" "strings" - yaml "gopkg.in/yaml.v2" - sdk "github.com/cosmos/cosmos-sdk/types" - proto "github.com/gogo/protobuf/proto" + yaml "gopkg.in/yaml.v2" ) // NewVote creates a new Vote instance @@ -62,7 +61,7 @@ func NewNonSplitVoteOption(option VoteOption) WeightedVoteOptions { } func (v WeightedVoteOption) String() string { - out, _ := proto.Marshal(&v) + out, _ := json.Marshal(v) return string(out) }