-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix: force genOrBroadcastFn even when max-msgs != 0 #364
fix: force genOrBroadcastFn even when max-msgs != 0 #364
Conversation
a819a84
to
5785fd0
Compare
975ff3d
to
b342b79
Compare
Codecov Report
@@ Coverage Diff @@
## release/v0.43.x #364 +/- ##
==================================================
Coverage ? 53.17%
==================================================
Files ? 642
Lines ? 67250
Branches ? 0
==================================================
Hits ? 35763
Misses ? 28545
Partials ? 2942 |
I think it's a good solution. However, it seems that the target branch should be |
b342b79
to
eed98a2
Compare
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.
LGTM
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.
LGTM
I have submitted the corresponding PR to cosmos-sdk. I will apply this PR after they respond. |
If cli tx withdraw-all-rewards sends empty tx, the tx would be rejected by validators because it has no msgs. However, the cli sends empty tx only if one sets `--max-msgs=0` which means it does not split the msgs. When you set `max-msgs` with any positive number, the cli does not send any tx, which may confuse you because you cannot get the feedback indicating the address has no delegations. This patch addresses the problem, by forcing genOrBroadcastFn when the number of total msgs generated is zero. It will provide the same user experience with any `max-msgs`.
eed98a2
to
b899dae
Compare
withdraw-all-rewards
when the signer has no delegationsbe3591b
to
66ff604
Compare
Description
If cli tx withdraw-all-rewards sends empty tx, the tx would be
rejected by validators because it has no msgs. However, the cli sends
empty tx only if one sets
--max-msgs=0
which means it does not splitthe msgs. When you set
max-msgs
with any positive number, the clidoes not send any tx, which may confuse you because you cannot get the
feedback indicating the address has no delegations.
This patch addresses the problem, by forcing genOrBroadcastFn when the
number of total msgs generated is zero. It will provide the same user
experience with any
max-msgs
.closes: #363
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes