-
Notifications
You must be signed in to change notification settings - Fork 639
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
refactor calls based on required error success in broadcast message. #3475
refactor calls based on required error success in broadcast message. #3475
Conversation
e2e/tests/transfer/base_test.go
Outdated
} else { | ||
s.Require().Equal(uint32(2), transferTxResp.Code) | ||
s.Require().Contains(transferTxResp.RawLog, "errUnknownField") | ||
s.Require().Contains("errUnknownField", transferTxResp.RawLog) |
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.
as far as I could tell this is coming from unknownproto
in the sdk, couldn't find a registered error for it elsewhere.
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.
That's correct. I can't remember exactly where the SDK is constructing the returned error. The test is passing a sdk.Msg with an extra field the chain doesn't understand, so when it tries to unmarshal the sdk.Msg, the unknown field error is returned. I think it's fine to leave as is. It would be nice if we knew the root error though. I wonder if it is this error. Ah I think I found it!
Is the updated change the right ordering? Looks like the Contains
godoc has the elem in question as the second argument?
5ba660d
to
8acc156
Compare
8acc156
to
54d245e
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.
Nice work!! Left minor comments, but otherwise everything looks great to me :)
e2e/tests/transfer/base_test.go
Outdated
} else { | ||
s.Require().Equal(uint32(2), transferTxResp.Code) | ||
s.Require().Contains(transferTxResp.RawLog, "errUnknownField") | ||
s.Require().Contains("errUnknownField", transferTxResp.RawLog) |
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.
That's correct. I can't remember exactly where the SDK is constructing the returned error. The test is passing a sdk.Msg with an extra field the chain doesn't understand, so when it tries to unmarshal the sdk.Msg, the unknown field error is returned. I think it's fine to leave as is. It would be nice if we knew the root error though. I wonder if it is this error. Ah I think I found it!
Is the updated change the right ordering? Looks like the Contains
godoc has the elem in question as the second argument?
…rror-check-with-assertsuccesstx-or-assertfailedtx
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 @DimitrisJim!
…rror-check-with-assertsuccesstx-or-assertfailedtx
…rror-check-with-assertsuccesstx-or-assertfailedtx
…rror-check-with-assertsuccesstx-or-assertfailedtx
…rror-check-with-assertsuccesstx-or-assertfailedtx
note: would be nice if #3552 is handled first in order to get the tests that require specific errors from there to use them here, see #3475 (comment) |
…rror-check-with-assertsuccesstx-or-assertfailedtx
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 @DimitrisJim 🙏
…rror-check-with-assertsuccesstx-or-assertfailedtx
Description
closes: #3435
Commit Message / Changelog Entry
imp: refactor calls based on required error success in broadcast message.
see the guidelines for commit messages. (view raw markdown for examples)
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.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.