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

Avoid calling exit from inside library, and removed "create-genesis-json" startup option #1529

Merged
merged 5 commits into from
Jan 22, 2019

Conversation

jmjatlanta
Copy link
Contributor

Fixes #1110

Calling exit from inside a library makes unit testing impossible. This fix uses return values to indicate if the application should end or continue.

@abitmore abitmore added this to the 201901 - Feature Release milestone Jan 14, 2019
@pmconrad
Copy link
Contributor

IMO the --create-example-genesis option does not serve a useful purpose.
Things could be simplified by creating an example genesis file somewhere in the documentation, removing that option from the code, and throwing in case of an error instead of defining and checking return codes. Return codes are error-prone, which is why exceptions were invented.

@jmjatlanta
Copy link
Contributor Author

IMO the --create-example-genesis option does not serve a useful purpose.

I can certainly do that. I do believe that option is part of some instructions (private testnet perhaps?), so cleaning the documentation would be required. @abitmore I would appreciate your opinion.

@abitmore
Copy link
Member

I prefer keeping the code if it leads to less work.

@pmconrad
Copy link
Contributor

Accepting this PR will be the least work of course, but IMO the end result would be better if my suggestion was implemented.

@pmconrad
Copy link
Contributor

Please resolve conflicts, then I'll approve.

@abitmore abitmore changed the title Avoid calling exit from inside library Avoid calling exit from inside library, and removed "create-genesis-json" startup option Jan 21, 2019
@abitmore
Copy link
Member

Created issue #1536 for tracking documentation work.

Copy link
Contributor

@pmconrad pmconrad left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

3 participants