diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp index 2524d688..e9866fef 100644 --- a/src/wallet/wallets_manager.cpp +++ b/src/wallet/wallets_manager.cpp @@ -2205,13 +2205,15 @@ void wallets_manager::wallet_vs_options::worker_func() epee::math_helper::once_a_time_seconds scan_pool_interval; epee::math_helper::once_a_time_seconds<2> pos_minin_interval; view::wallet_status_info wsi = AUTO_VAL_INIT(wsi); + + wsi.wallet_state = view::wallet_status_info::wallet_state_synchronizing; + long_refresh_in_progress = true; + while (!major_stop) { stop_for_refresh = false; try { - wsi.wallet_state = view::wallet_status_info::wallet_state_synchronizing; - long_refresh_in_progress = true; if (m_pproxy_diagnostig_info->last_daemon_is_disconnected.load()) { std::this_thread::sleep_for(std::chrono::milliseconds(1000)); diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp index f98b1bf8..220ef128 100644 --- a/tests/performance_tests/main.cpp +++ b/tests/performance_tests/main.cpp @@ -81,11 +81,11 @@ void test_plain_wallet() - std::string seed; - if (!epee::file_io_utils::load_file_to_string("C:\\Users\\roky\\home\\temp\\wallets\\seed.txt", seed)) - return; + //std::string seed; + //if (!epee::file_io_utils::load_file_to_string("C:\\Users\\roky\\home\\temp\\wallets\\seed.txt", seed)) + // return; - std::string res___ = plain_wallet::get_wallet_files(); + //std::string res___ = plain_wallet::get_wallet_files(); uint64_t instance_id = 0; @@ -102,7 +102,7 @@ void test_plain_wallet() //res = plain_wallet::sync_call("reset_connection_url", 0, "http://127.0.0.1:11211"); - r = plain_wallet::sync_call("run_wallet", instance_id, ""); + //r = plain_wallet::sync_call("run_wallet", instance_id, ""); @@ -115,7 +115,7 @@ void test_plain_wallet() res = plain_wallet::sync_call("get_wallet_status", instance_id, ""); view::wallet_sync_status_info wsi = AUTO_VAL_INIT(wsi); epee::serialization::load_t_from_json(wsi, res); - LOG_PRINT_L0("Progress: " << wsi.progress << " state: " << wsi.wallet_state << ", height: " << wsi.current_wallet_height << " of " << wsi.current_daemon_height); + LOG_PRINT_L0("Progress: " << wsi.progress << " state: " << wsi.wallet_state << "is_in_long_refresh: " << wsi.is_in_long_refresh << ", height: " << wsi.current_wallet_height << " of " << wsi.current_daemon_height); if (wsi.wallet_state == 2) break; } @@ -178,8 +178,8 @@ int main(int argc, char** argv) //epee::log_space::log_singletone::add_logger(LOGGER_FILE, // epee::log_space::log_singletone::get_default_log_file().c_str(), // epee::log_space::log_singletone::get_default_log_folder().c_str()); - test_base64_serialization(); - //test_plain_wallet(); + //test_base64_serialization(); + test_plain_wallet(); //parse_weird_tx(); //thread_pool_tests();