Refactored password prompting for wallets

This commit is contained in:
Lee Clagett
2016-12-17 18:07:15 -05:00
parent 5fcf7c1c18
commit 2bddb8ebee
7 changed files with 225 additions and 375 deletions
+3
View File
@@ -104,6 +104,9 @@ namespace tools
static bool has_testnet_option(const boost::program_options::variables_map& vm);
static void init_options(boost::program_options::options_description& desc_params);
//! \return Password retrieved from prompt. Logs error on failure.
static boost::optional<password_container> password_prompt(const bool is_new_wallet);
//! Uses stdin and stdout. Returns a wallet2 if no errors.
static std::unique_ptr<wallet2> make_from_json(const boost::program_options::variables_map& vm, const std::string& json_file);