rename param offset to seed_offset to be clear

This commit is contained in:
woodser
2019-12-12 09:20:25 -05:00
parent a47504877a
commit 854dae4619
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -821,7 +821,7 @@ namespace monero {
return wallet;
}
monero_wallet_core* monero_wallet_core::create_wallet_from_mnemonic(const string& path, const string& password, const monero_network_type network_type, const string& mnemonic, const monero_rpc_connection& daemon_connection, uint64_t restore_height, const string& offset) {
monero_wallet_core* monero_wallet_core::create_wallet_from_mnemonic(const string& path, const string& password, const monero_network_type network_type, const string& mnemonic, const monero_rpc_connection& daemon_connection, uint64_t restore_height, const string& seed_offset) {
MTRACE("create_wallet_from_mnemonic(path, password, mnemonic, network_type, daemon_connection, restore_height)");
monero_wallet_core* wallet = new monero_wallet_core();
@@ -833,7 +833,7 @@ namespace monero {
if (language == crypto::ElectrumWords::old_language_name) language = Language::English().get_language_name();
// apply offset if given
if (!offset.empty()) recovery_key = cryptonote::decrypt_key(recovery_key, offset);
if (!seed_offset.empty()) recovery_key = cryptonote::decrypt_key(recovery_key, seed_offset);
// initialize wallet
wallet->m_w2 = unique_ptr<tools::wallet2>(new tools::wallet2(static_cast<cryptonote::network_type>(network_type), 1, true));
+2 -1
View File
@@ -119,8 +119,9 @@ namespace monero {
* @param mnemonic is the mnemonic of the wallet to construct
* @param daemon_connection is connection information to a daemon (default = an unconnected wallet)
* @param restore_height is the block height to restore (i.e. scan the chain) from (default = 0)
* @param seed_offset is a string used to derive a new mnemonic from the given mnemonic, allowing password-protected wallets to be recovered from a plain-text mnemonic
*/
static monero_wallet_core* create_wallet_from_mnemonic(const string& path, const string& password, const monero_network_type network_type, const string& mnemonic, const monero_rpc_connection& daemon_connection, uint64_t restore_height, const string& offset);
static monero_wallet_core* create_wallet_from_mnemonic(const string& path, const string& password, const monero_network_type network_type, const string& mnemonic, const monero_rpc_connection& daemon_connection, uint64_t restore_height, const string& seed_offset);
/**
* Create a wallet from an address, view key, and spend key.
+2 -2
View File
@@ -93,7 +93,7 @@ namespace monero {
return wallet;
}
monero_wallet_keys* monero_wallet_keys::create_wallet_from_mnemonic(const monero_network_type network_type, const string& mnemonic, const string& offset) {
monero_wallet_keys* monero_wallet_keys::create_wallet_from_mnemonic(const monero_network_type network_type, const string& mnemonic, const string& seed_offset) {
// validate mnemonic and get recovery key and language
crypto::secret_key recovery_key;
@@ -103,7 +103,7 @@ namespace monero {
if (language == crypto::ElectrumWords::old_language_name) language = Language::English().get_language_name();
// apply offset if given
if (!offset.empty()) recovery_key = cryptonote::decrypt_key(recovery_key, offset);
if (!seed_offset.empty()) recovery_key = cryptonote::decrypt_key(recovery_key, seed_offset);
// initialize wallet account
monero_wallet_keys* wallet = new monero_wallet_keys();
+1 -1
View File
@@ -86,7 +86,7 @@ namespace monero {
* @param network_type is the wallet's network type
* @param mnemonic is the mnemonic of the wallet to construct
*/
static monero_wallet_keys* create_wallet_from_mnemonic(const monero_network_type network_type, const string& mnemonic, const string& offset);
static monero_wallet_keys* create_wallet_from_mnemonic(const monero_network_type network_type, const string& mnemonic, const string& seed_offset);
/**
* Create a wallet from an address, view key, and spend key.