-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R4R: x/gov Get Vote(s)/Deposit(s) Updates #3091
Conversation
35748e0
to
f5e0379
Compare
Codecov Report
@@ Coverage Diff @@
## develop #3091 +/- ##
===========================================
- Coverage 54.31% 54.31% -0.01%
===========================================
Files 136 136
Lines 10210 10212 +2
===========================================
+ Hits 5546 5547 +1
- Misses 4326 4327 +1
Partials 338 338 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks GREAT and lots to like on the implementation here. The one thing I would request is to expand the governance LCD tests to test these cases (once a proposal passes, does the data come back properly for votes and deposits). Is that possible?
@jackzampolin unfortunately I do not have any direct or good way of testing this. Our LCD tests are pretty rigid in that they all use the same Feel free to take a stab at it? |
Ok added an issue to track that: #3094. This PR gets a 👍 from me now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome ! Some comments and then we should be ok for merging
@fedekunze addressed your comments. |
cdc.UnmarshalJSON(res, &deposit) | ||
|
||
if deposit.Empty() { | ||
res, err = gcutils.QueryDepositByTxQuery(cdc, cliCtx, params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we get the proposal and query the deposit tx if it's not on deposit or voting period ? I mean, shouldn't we have an if...else
around res, err := cliCtx.QueryWithData(fmt.Sprintf("custom/%s/deposit", queryRoute)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm I dont think so. I think its implicit. Deposit will be empty in the case where its not voting or deposit period, no?
Responded @fedekunze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. Thanks @alexanderbez !
Action
tag to voting and deposit handlersSearchTxs
)closes: #2879
closes: #2880
/cc @johnmcdowall
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: