Skip to content
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

imp!: allow failure expectations when using chain.SendMsgs #4018

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

damiannolan
Copy link
Member

@damiannolan damiannolan commented Jul 5, 2023

Description

Allow failure expectations from function calls which use chain.SendMsgs()

e.g. I want to be able to call endpoint.ChanUpgradeInit() and expect an error is returned

  • Removes testing.TB and expPass args from SignAndDeliver and allows the caller to determine whether or not the expectation is success or failure.

closes: #XXXX


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.

  • 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.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@damiannolan damiannolan marked this pull request as ready for review July 5, 2023 14:34
@damiannolan damiannolan changed the title imp: allow failure expectations when using chain.SendMsgs imp!: allow failure expectations when using chain.SendMsgs Jul 5, 2023
Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 looks like a good idea to me

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙏

Copy link
Contributor

@charleenfei charleenfei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice idea, sgtm!

@colin-axner
Copy link
Contributor

Just a note this will be reconfigured in the update to Eden, but the same concept is applied. If the tx returns a non-zero error code, it will be returned as an error to the SendMsgs caller

@damiannolan damiannolan enabled auto-merge (squash) July 5, 2023 16:05
@damiannolan damiannolan merged commit 1fda14d into main Jul 5, 2023
@damiannolan damiannolan deleted the damian/allow-sim-deliver-exp-failure branch July 5, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants