-
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
IBC: panic on GetSignBytes and remove SubModuleCdc #7645
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7645 +/- ##
==========================================
- Coverage 54.15% 54.14% -0.02%
==========================================
Files 611 611
Lines 38556 38556
==========================================
- Hits 20881 20877 -4
- Misses 15543 15547 +4
Partials 2132 2132 |
func (msg MsgTransfer) GetSignBytes() []byte { | ||
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) | ||
panic("IBC messages do not support amino") |
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.
q: why not return nil bytes? the tx will fail regardless
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.
What if someone tries to use this function in an application module? Returning nil could be a silent failure. Also going off this comment
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 guess the logic for panic is that it will clearly communicate why it's failing whereas in Jack's issue he thought it should work.
func (msg MsgCreateClient) GetSignBytes() []byte { | ||
return sdk.MustSortJSON(SubModuleCdc.MustMarshalJSON(&msg)) | ||
panic("IBC messages do not support amino") |
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.
ditto
* panic on GetSignBytes and remove SubModuleCdc where possible * fix build Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Description
ref: #7638
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