Skip to content

Commit

Permalink
Address @fedekunze PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzampolin committed Jan 18, 2019
1 parent 9614e77 commit b6bea2b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ BREAKING CHANGES
* [\#3069](https://github.com/cosmos/cosmos-sdk/pull/3069) `--fee` flag renamed to `--fees` to support multiple coins
* [\#3156](https://github.com/cosmos/cosmos-sdk/pull/3156) Remove unimplemented `gaiacli init` command
* [\#2222] `gaiacli tx stake` -> `gaiacli tx staking`, `gaiacli query stake` -> `gaiacli query staking`
* [\#3320](https://github.com/cosmos/cosmos-sdk/pull/3320) Ensure all `gaiacli query` commands respect the `--output` and `--indent` flags
* [\#3320](https://github.com/cosmos/cosmos-sdk/pull/3320) Ensure all `gaiacli query` commands respect the `--output` and `--indent` flags
* [\#3268](https://github.com/cosmos/cosmos-sdk/issues/3268) Unify `params` queries call

* Gaia
* https://github.com/cosmos/cosmos-sdk/issues/2838 - Move store keys to constants
Expand Down
5 changes: 5 additions & 0 deletions docs/gaia/gaiacli.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,11 @@ To check the current governance parameters run:

```bash
gaiacli query gov params
```

To query subsets of the governance parameters run:

```bash
gaiacli query gov param voting
gaiacli query gov param tallying
gaiacli query gov param deposit
Expand Down
9 changes: 5 additions & 4 deletions x/gov/client/utils/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ type Proposer struct {
Proposer string `json:"proposer"`
}

func NewProposer(proposalID uint64, proposer string) Proposer {
return Proposer{proposalID, proposer}
}

func (p Proposer) String() string {
return fmt.Sprintf(`ProposalID: %d
Proposer: %s`, p.ProposalID, p.Proposer)
Expand Down Expand Up @@ -225,10 +229,7 @@ func QueryProposerByTxQuery(
// there should only be a single proposal under the given conditions
if msg.Type() == gov.TypeMsgSubmitProposal {
subMsg := msg.(gov.MsgSubmitProposal)
return Proposer{
ProposalID: proposalID,
Proposer: subMsg.Proposer.String(),
}, nil
return NewProposer(proposalID, subMsg.Proposer.String()), nil
}
}
}
Expand Down

0 comments on commit b6bea2b

Please sign in to comment.