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

Inconsistent return of contractAddress from keeper/init()? #616

Closed
assafmo opened this issue Sep 21, 2021 · 3 comments · Fixed by #619
Closed

Inconsistent return of contractAddress from keeper/init()? #616

assafmo opened this issue Sep 21, 2021 · 3 comments · Fixed by #619
Milestone

Comments

@assafmo
Copy link
Contributor

assafmo commented Sep 21, 2021

Hi guys 👋, when there are errors in keeper/init(), why is contractAddress returned here [1][2] but not here [1][2][3][4][5]?

@alpe
Copy link
Member

alpe commented Sep 21, 2021

Good 👁️ . In idiomatic Go all other values should be ignored when an error is returned. Therefore the contractAddress should have no effect. But we can clearly improve this by returning nil in all error cases.
Do you want to do the PR?

@alpe alpe added this to the v0.20.0 milestone Sep 21, 2021
@assafmo
Copy link
Contributor Author

assafmo commented Sep 21, 2021

Yeah, sure. Thanks for confirming.

@ethanfrey
Copy link
Member

Also, in the sdk, when you return an error result, all events and data from the execution are ignored, just an error message is returned. So for the client, this is always invisible.

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 a pull request may close this issue.

3 participants