Cosmos-sdk: MsgCreateValidator doesn't implement yaml.Marshaler

Created on 30 Sep 2019  Â·  1Comment  Â·  Source: cosmos/cosmos-sdk

Summary of Bug


staking.MsgCreateValidator implements interface json.Marshaler but doesn't implement interface yaml.Marshaler. This causes the text output of cli tx query command looks very ugly, like this:

j@j ~ $ ./mycli q tx 5CC83B97D798AC7B812D32CE2B193C55CFC83CD7DA894DA8AF1A1E79E52A385D --trust-node

info: ""
gaswanted: 300000
gasused: 77902
events:
- type: message
  attributes:
  - key: action
    value: create_validator
codespace: ""
tx:
  msg:
  - description:
      moniker: <your_moniker_name>
      identity: ""
      website: ""
      details: ""
    commission:
      rate: "0.100000000000000000"
      max_rate: "0.200000000000000000"
      max_change_rate: "0.010000000000000000"
    min_self_delegation: "500000000000000"
    delegator_address: cettest1wrl8lzre3u05msrlagxkx7e4q0szp4usjpcy0z
    validator_address: cettestvaloper1wrl8lzre3u05msrlagxkx7e4q0szp4uswgmmls
    pubkey:
    - 153
    - 85
    - 161
    - 9
    - 255
    - 2
    - 202
    - 213
    - 158
    - 38
    - 76
    - 202
    - 196
    - 254
    - 102
    - 184
    - 243
    - 189
    - 86
    - 185
    - 13
    - 109
    - 80
    - 89
    - 2
    - 82
    - 100
    - 28
    - 166
    - 53
    - 122
    - 182
    value:
      denom: cet
      amount: "500000000000000"
  fee:
    amount:
    - denom: cet
      amount: "6000000"
    gas: 300000
  signatures:
  - |
    pubkey: cettestpub1addwnpepqwrxg3amuqzmnrc6m3rlx26z5y63zlwcfu8zdqa4nmsr2zr2ez35kdxwc9e
    signature: !!binary |
      D7E8p4Zdblu06T+kMIb+8dxrZQqXuC63hA/PyQIabiUvKYUaptRSn36p2b7jL5rhGBoebf
      Cba+EOo04CNXYv2g==
  memo: ""
timestamp: "2019-09-28T11:26:23Z"

Version


v0.37.0

Steps to Reproduce


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned
good first issue staking

Most helpful comment

I would like to take this up. have already implemented the yamlMarshaler in the msg.go and now writing a test for it.

>All comments

I would like to take this up. have already implemented the yamlMarshaler in the msg.go and now writing a test for it.

Was this page helpful?
0 / 5 - 0 ratings