mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-19 08:08:39 +02:00
couts
This commit is contained in:
@@ -825,14 +825,22 @@ namespace monero {
|
||||
monero_wallet_core* monero_wallet_core::create_wallet_random(const string& path, const string& password, const monero_network_type network_type, const monero_rpc_connection& daemon_connection, const string& language, epee::net_utils::http::abstract_http_client *http_client) {
|
||||
MTRACE("create_wallet_random(path, password, network_type, daemon_connection, language)");
|
||||
monero_wallet_core* wallet = new monero_wallet_core();
|
||||
cout << "1" << endl;
|
||||
if (http_client == nullptr) wallet->m_w2 = unique_ptr<tools::wallet2>(new tools::wallet2(static_cast<cryptonote::network_type>(network_type), 1, true));
|
||||
else wallet->m_w2 = unique_ptr<tools::wallet2>(new tools::wallet2(static_cast<cryptonote::network_type>(network_type), 1, true, http_client));
|
||||
cout << "2" << endl;
|
||||
wallet->set_daemon_connection(daemon_connection);
|
||||
cout << "3" << endl;
|
||||
wallet->m_w2->set_seed_language(language);
|
||||
cout << "4" << endl;
|
||||
crypto::secret_key secret_key;
|
||||
cout << "5" << endl;
|
||||
wallet->m_w2->generate(path, password, secret_key, false, false);
|
||||
cout << "6" << endl;
|
||||
wallet->init_common();
|
||||
cout << "7" << endl;
|
||||
if (wallet->is_connected()) wallet->m_w2->set_refresh_from_block_height(wallet->get_daemon_height());
|
||||
cout << "8" << endl;
|
||||
return wallet;
|
||||
}
|
||||
|
||||
@@ -852,13 +860,20 @@ namespace monero {
|
||||
if (!seed_offset.empty()) recovery_key = cryptonote::decrypt_key(recovery_key, seed_offset);
|
||||
|
||||
// initialize wallet
|
||||
cout << "1" << endl;
|
||||
if (http_client == nullptr) wallet->m_w2 = unique_ptr<tools::wallet2>(new tools::wallet2(static_cast<cryptonote::network_type>(network_type), 1, true));
|
||||
else wallet->m_w2 = unique_ptr<tools::wallet2>(new tools::wallet2(static_cast<cryptonote::network_type>(network_type), 1, true, http_client));
|
||||
cout << "2" << endl;
|
||||
wallet->set_daemon_connection(daemon_connection);
|
||||
cout << "3" << endl;
|
||||
wallet->m_w2->set_seed_language(language);
|
||||
cout << "4" << endl;
|
||||
wallet->m_w2->generate(path, password, recovery_key, true, false);
|
||||
cout << "5" << endl;
|
||||
wallet->m_w2->set_refresh_from_block_height(restore_height);
|
||||
cout << "6" << endl;
|
||||
wallet->init_common();
|
||||
cout << "7" << endl;
|
||||
return wallet;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user