From 92ea174ea6e66520dcb126e41f9e5d37148d0585 Mon Sep 17 00:00:00 2001 From: Rahul Dwivedi Date: Sun, 13 Oct 2019 08:33:31 +0530 Subject: [PATCH] Merge PR #5168: Add missing description field to MsgCreateValidator YAML output --- x/staking/types/msg.go | 2 ++ x/staking/types/msg_test.go | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/x/staking/types/msg.go b/x/staking/types/msg.go index 84a3a809c..b1d23514e 100644 --- a/x/staking/types/msg.go +++ b/x/staking/types/msg.go @@ -116,6 +116,7 @@ func (msg *MsgCreateValidator) UnmarshalJSON(bz []byte) error { // custom marshal yaml function due to consensus pubkey func (msg MsgCreateValidator) MarshalYAML() (interface{}, error) { bs, err := yaml.Marshal(struct { + Description Description Commission CommissionRates MinSelfDelegation sdk.Int DelegatorAddress sdk.AccAddress @@ -123,6 +124,7 @@ func (msg MsgCreateValidator) MarshalYAML() (interface{}, error) { PubKey string Value sdk.Coin }{ + Description: msg.Description, Commission: msg.Commission, MinSelfDelegation: msg.MinSelfDelegation, DelegatorAddress: msg.DelegatorAddress, diff --git a/x/staking/types/msg_test.go b/x/staking/types/msg_test.go index d4d618300..1b5d826b8 100644 --- a/x/staking/types/msg_test.go +++ b/x/staking/types/msg_test.go @@ -179,6 +179,12 @@ func TestMsgMarshalYAML(t *testing.T) { require.NoError(t, err) want := fmt.Sprintf(`| + description: + moniker: a + identity: b + website: c + security_contact: d + details: e commission: rate: "0.000000000000000000" max_rate: "0.000000000000000000"