-
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: split POST delegations endpoint #2997
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2997 +/- ##
===========================================
- Coverage 52.17% 52.14% -0.04%
===========================================
Files 136 136
Lines 9619 9612 -7
===========================================
- Hits 5019 5012 -7
- Misses 4263 4264 +1
+ Partials 337 336 -1 |
…edekunze/2191-split-post-delegations Rebase
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.
A couple of comments, and a request for more test coverage.
|
||
i++ | ||
} | ||
func postRedelegationsHandlerFn(cdc *codec.Codec, kb keys.Keybase, cliCtx context.CLIContext) http.HandlerFunc { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
||
txBldr = newBldr | ||
} | ||
func postUnbondingDelegationsHandlerFn(cdc *codec.Codec, kb keys.Keybase, cliCtx context.CLIContext) http.HandlerFunc { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
Thanks of fixing that! Looks good otherwise!
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.
I don't understand the PUT
/ POST
distinction (but probably that's just me).
Otherwise tested ACK.
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.
Did a partial review and left some comments. I just want to make sure we support simulation and generation only.
Addressed. See comment for support simulation and generation only txs above
Willing to give this an approval pending once generate_only and sim is confirmed working 👍 |
Maybe we add tests for those cases @alexanderbez mentioned |
…edekunze/2191-split-post-delegations Merge develop
@alexanderbez updated the PR to test the |
client/utils/rest.go
Outdated
return nil | ||
genOnlyStr := r.FormValue("generate_only") | ||
if len(genOnlyStr) > 0 { | ||
cliCtx.GenerateOnly, err = strconv.ParseBool(genOnlyStr) |
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.
x/stake/client/rest/tx.go
Outdated
|
||
simulateGas, gas, err := client.ReadGasFlag(baseReq.Gas) | ||
cliCtx, err := utils.ReadRESTReq(w, r, cdc, cliCtx, &req) |
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.
Ughhh, CLIContext has really evolved. I think we should consider renaming it. Maybe ClientContext
?
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.
oh I always thought it was Command Line Interface Context lol
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.
It is! I just think it's more appropriate to call it a ClientContext
at this point (e.g. look how it's being used here).
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.
Changes LGTM -- thanks @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.
Going to get this in once the 0.28 release PRs are merged
@fedekunze can you resolve the merge conflicts here? |
updated, please review again |
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.
Tested ACK
Closes #2191
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: