diff --git a/src/currency_core/blockchain_storage.cpp b/src/currency_core/blockchain_storage.cpp index 86c16f4d..959e2765 100644 --- a/src/currency_core/blockchain_storage.cpp +++ b/src/currency_core/blockchain_storage.cpp @@ -156,7 +156,6 @@ void blockchain_storage::init_options(boost::program_options::options_descriptio command_line::add_arg(desc, arg_db_cache_l2); } //------------------------------------------------------------------ - uint64_t blockchain_storage::get_block_h_older_then(uint64_t timestamp) const { // get avarage block position diff --git a/src/currency_core/currency_config.h b/src/currency_core/currency_config.h index 37cdd8f1..af7ad918 100644 --- a/src/currency_core/currency_config.h +++ b/src/currency_core/currency_config.h @@ -219,7 +219,7 @@ #define BLOCK_MINOR_VERSION_GENESIS 0 #define BLOCK_MAJOR_VERSION_INITAL 0 #ifndef TESTNET -#define ZANO_HARDFORK_1_AFTER_HEIGHT 186247 +#define ZANO_HARDFORK_1_AFTER_HEIGHT 194624 #else #define ZANO_HARDFORK_1_AFTER_HEIGHT 1440 #endif diff --git a/src/gui/qt-daemon/application/daemon_backend.cpp b/src/gui/qt-daemon/application/daemon_backend.cpp index d3eb94a8..a3bd0956 100644 --- a/src/gui/qt-daemon/application/daemon_backend.cpp +++ b/src/gui/qt-daemon/application/daemon_backend.cpp @@ -429,7 +429,8 @@ void daemon_backend::main_worker(const po::variables_map& m_vm) //m_pview->update_daemon_status(dsi); try { - wo.second.stop = true; + wo.second.major_stop = true; + wo.second.stop_for_refresh = true; wo.second.w.unlocked_get()->stop(); wo.second.w->get()->store(); @@ -543,7 +544,8 @@ void daemon_backend::init_wallet_entry(wallet_vs_options& wo, uint64_t id) { wo.wallet_id = id; wo.do_mining = false; - wo.stop = false; + wo.major_stop = false; + wo.stop_for_refresh = false; wo.plast_daemon_height = &m_last_daemon_height; wo.plast_daemon_network_state = &m_last_daemon_network_state; wo.plast_daemon_is_disconnected = &m_last_daemon_is_disconnected; @@ -837,7 +839,8 @@ std::string daemon_backend::close_wallet(size_t wallet_id) try { - it->second.stop = true; + it->second.major_stop = true; + it->second.stop_for_refresh = true; it->second.w.unlocked_get()->stop(); it->second.w->get()->store(); @@ -1488,8 +1491,9 @@ void daemon_backend::wallet_vs_options::worker_func() epee::math_helper::once_a_time_seconds<1> scan_pool_interval; epee::math_helper::once_a_time_seconds pos_minin_interval; view::wallet_status_info wsi = AUTO_VAL_INIT(wsi); - while (!stop) + while (!major_stop) { + stop_for_refresh = false; try { wsi.wallet_state = view::wallet_status_info::wallet_state_ready; @@ -1516,7 +1520,7 @@ void daemon_backend::wallet_vs_options::worker_func() prepare_wallet_status_info(*this, wsi); pview->update_wallet_status(wsi); } - w->get()->refresh(stop); + w->get()->refresh(stop_for_refresh); w->get()->resend_unconfirmed(); { auto w_ptr = *w; // get locked exclusive access to the wallet first (it's more likely that wallet is locked for a long time than 'offers') @@ -1548,7 +1552,7 @@ void daemon_backend::wallet_vs_options::worker_func() }); } - if (stop) + if (major_stop || stop_for_refresh) break; //****************************************************************************************** //mining zone @@ -1614,7 +1618,8 @@ void daemon_backend::wallet_vs_options::worker_func() daemon_backend::wallet_vs_options::~wallet_vs_options() { do_mining = false; - stop = true; + major_stop = true; + stop_for_refresh = true; break_mining_loop = true; if (miner_thread.joinable()) miner_thread.join(); diff --git a/src/gui/qt-daemon/application/daemon_backend.h b/src/gui/qt-daemon/application/daemon_backend.h index bcf878ee..372919f3 100644 --- a/src/gui/qt-daemon/application/daemon_backend.h +++ b/src/gui/qt-daemon/application/daemon_backend.h @@ -56,7 +56,10 @@ public: currency::core_runtime_config core_conf; epee::locked_object, wallet_lock_time_watching_policy> w; std::atomic do_mining; - std::atomic stop; + std::atomic major_stop; + std::atomic stop_for_refresh; //use separate var for passing to "refresh" member function, + //because it can be changed there due to internal interruption logis + std::atomic break_mining_loop; std::atomic wallet_state; std::atomic last_wallet_synch_height; diff --git a/src/version.h.in b/src/version.h.in index 8b4a2f64..1a166f27 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -7,6 +7,6 @@ #define PROJECT_REVISION "0" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 54 +#define PROJECT_VERSION_BUILD_NO 56 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"