-
Notifications
You must be signed in to change notification settings - Fork 649
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
add quit command to cli_wallet #1050 #1104
Conversation
2226b20
to
994acf0
Compare
da4b84e
to
723ee56
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.
just FC_THROW isn't enough as I've tested it just print message and that's all
723ee56
to
6d9ba1c
Compare
9a22871
to
c61a994
Compare
@ryanRfox @abitmore @oxarbitrage @jmjatlanta @clockworkgr I've added test case as requested and try/catch block, still cannot understand what to use instead of EXIT, can anybody advise anything what is the best to use instead of EXIT ? Thanks everybody ! |
please research for an alternative and present for discussion all the options you can find, we don't know either. |
the test is not enough in my opinion. it needs to create some accounts, move some balances, then |
ok sure ! Thanks ! 👍 |
I see that even in libraries exit is still used in many different places, for example:
and in the whole project there are also other places with exit method. So what can you say about that guys @oxarbitrage @abitmore @ryanRfox @jmjatlanta @clockworkgr ? Why there is it OK but not here ? Or there isn't OK too ? |
@nanomobile thanks for the report. We need to fix those. Exiting from a library makes it very hard if not impossible to test with boost testing framework. For the 2 exiting on error, should change to throw an exception. For the other one, probably should return a special value then check at where calling it. Need to create new issues for these though. |
there are not only 3 places with exit method, we need to fix all IMHO |
Created new issue: #1110, please feel free to add more findings there. Thanks. |
c61a994
to
da4fec3
Compare
just rebased current changes in this PR to be synced with core/develop, soon will make more commits in order to make everything correctly and close this issue |
instead of using exit(0) it's much better to use _Exit(0) as described here http://www.cplusplus.com/reference/cstdlib/_Exit/ :
|
guys check and test this pull request please if this issue can be closed or not yet ... |
ok sure ! Thanks ! Will fix now ! |
Now it's wrong. void quit() doesn't return anything. |
ok understood :-) will remove it :-) |
@cogutvalera please bump FC to latest version to include the |
Bump FC is done ! Thank you guys ! |
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.
How to validate the wallet file:
Manual test:
|
PR for #1050.