aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2014-06-04 18:59:47 -0400
committerThomas Winget <tewinget@gmail.com>2014-06-12 19:05:51 -0400
commit4f382b383005d09f6056371d0fecdc8b6ce37a08 (patch)
treeaf6a07f7b59bb432891ec0bf47772e3517a17c1d /src/wallet/wallet2.cpp
parentadded vim swap files to .gitignore (diff)
downloadmonero-4f382b383005d09f6056371d0fecdc8b6ce37a08.tar.xz
most functions prototyped/modified for wallet recovery
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index fb1e5575b..b0c341615 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -38,6 +38,7 @@ void do_prepare_file_names(const std::string& file_path, std::string& keys_file,
keys_file += ".keys";
}
}
+
} //namespace
namespace tools
@@ -435,7 +436,7 @@ void wallet2::load_keys(const std::string& keys_file_name, const std::string& pa
THROW_WALLET_EXCEPTION_IF(!r, error::invalid_password);
}
//----------------------------------------------------------------------------------------------------
-void wallet2::generate(const std::string& wallet_, const std::string& password)
+void wallet2::generate(const std::string& wallet_, const std::string& password, const crypto::secret_key& recovery_param, bool recover)
{
clear();
prepare_file_names(wallet_);
@@ -444,7 +445,8 @@ void wallet2::generate(const std::string& wallet_, const std::string& password)
THROW_WALLET_EXCEPTION_IF(boost::filesystem::exists(m_wallet_file, ignored_ec), error::file_exists, m_wallet_file);
THROW_WALLET_EXCEPTION_IF(boost::filesystem::exists(m_keys_file, ignored_ec), error::file_exists, m_keys_file);
- m_account.generate();
+ m_account.generate(recovery_param, recover);
+
m_account_public_address = m_account.get_keys().m_account_address;
bool r = store_keys(m_keys_file, password);