Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Implement stateless non-interactive cli_wallet usage #161

Closed
nemothenoone opened this issue Jul 31, 2017 · 10 comments
Closed

Implement stateless non-interactive cli_wallet usage #161

nemothenoone opened this issue Jul 31, 2017 · 10 comments
Assignees

Comments

@nemothenoone
Copy link
Member

nemothenoone commented Jul 31, 2017

./cli_wallet unlock 1qaz get_private_key wqdasfadf

Output the result of the work in the order of pushing commands.

@nemothenoone nemothenoone self-assigned this Jul 31, 2017
@kotbegemot kotbegemot added this to BackLog in GolosCoreOLD Aug 5, 2017
@kotbegemot kotbegemot self-assigned this Aug 7, 2017
@marijadia marijadia removed this from Backlog in GolosCoreOLD Aug 14, 2017
@AKorpusenko
Copy link

AKorpusenko commented Aug 23, 2017

A way to implement this is to add a special program option. So for instance we can add program option called "commands". If cli_wallet is run this way: ./cli_wallet --commands="do_this&&do_that", then cli_wallet will execute command in sequence and will print result output of the commands execution in sequence also. By the way interactive mod will be disabled, so after it will immediately terminate.

@ghost ghost added WIP work in progress (4 wip bot) now labels Aug 25, 2017
AKorpusenko added a commit that referenced this issue Aug 25, 2017
@AKorpusenko
Copy link

Implemented option to run cli_wallet in non-interactive mode (commits: 1cdadf2 and 6a4c650). Also fc/rpc/cli is needed to be changed.

@AKorpusenko
Copy link

AKorpusenko commented Aug 26, 2017

  1. Made a commit to FC. (Look this https://github.com/GolosChain/fc/blob/161-impl-non-interactive-cli-wallet/include/fc/rpc/cli.hpp#L37) It isn't final version.
  2. Refactored one place of code to save encapsulation.

AKorpusenko added a commit that referenced this issue Aug 28, 2017
@AKorpusenko
Copy link

AKorpusenko commented Aug 28, 2017

  • Made a commit to FC (GolosChain/fc@bd0b507). There have been made only one small fix.

  • Next what about cli_wallet:

  1. Removed some superfluous checks.
  2. Fixed bug with wrong execute/output order: replaced std::map with std::vector of commands. They are executed one by one in the same order as are presented in "commands" string.
  3. Some blocks of code (parsing and one by one execution) have been separated and encapsulated into functions.

@AKorpusenko
Copy link

AKorpusenko commented Aug 29, 2017

@nemo1369 , please write how do the command's output should look like. Now it looks like:
"command output".

@AKorpusenko
Copy link

Refactored string parsing and command string storing way.
Asking for a code review @nemo1369 @kotbegemot

AKorpusenko added a commit that referenced this issue Aug 30, 2017
@nemothenoone
Copy link
Member Author

@AKorpusenko Build failure is still an issue: https://travis-ci.org/GolosChain/golos/builds/269897507

AKorpusenko added a commit that referenced this issue Sep 4, 2017
@kotbegemot kotbegemot added this to BackLog in GolosCoreOLD Sep 4, 2017
@kotbegemot kotbegemot moved this from BackLog to Review in GolosCoreOLD Sep 4, 2017
@kotbegemot kotbegemot moved this from Review to Done in GolosCoreOLD Sep 4, 2017
@mastercyb mastercyb removed the now label Sep 4, 2017
@kotbegemot kotbegemot modified the milestone: GolosChain 0.17.0 Sep 14, 2017
@VIM-Arcange
Copy link

VIM-Arcange commented Dec 2, 2017

Why not allow cli_wallet to execute a script (i.e. a list of commands put in a text file)
ex: ./cli_wallet --script=filename

@kotbegemot kotbegemot removed the WIP work in progress (4 wip bot) label Dec 2, 2017
@kotbegemot
Copy link

The option ./cli_wallet --script=filename can be seen in the future.
You can do without HF.

@VIM-Arcange
Copy link

VIM-Arcange commented Dec 2, 2017

You can do without HF.

Of course. I was just throwing the idea ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

No branches or pull requests

5 participants