From 8298f42e9d9c4d81792d7ab344efbe424e9b9ba2 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 4 Feb 2019 15:41:58 +0000 Subject: miner: it can now autodetect the optimal number of threads --- src/cryptonote_basic/miner.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cryptonote_basic/miner.h') diff --git a/src/cryptonote_basic/miner.h b/src/cryptonote_basic/miner.h index e16d9f3b8..d4cdb2363 100644 --- a/src/cryptonote_basic/miner.h +++ b/src/cryptonote_basic/miner.h @@ -103,6 +103,7 @@ namespace cryptonote bool worker_thread(); bool request_block_template(); void merge_hr(); + void update_autodetection(); struct miner_config { @@ -132,16 +133,20 @@ namespace cryptonote account_public_address m_mine_address; epee::math_helper::once_a_time_seconds<5> m_update_block_template_interval; epee::math_helper::once_a_time_seconds<2> m_update_merge_hr_interval; + epee::math_helper::once_a_time_seconds<1> m_autodetect_interval; std::vector m_extra_messages; miner_config m_config; std::string m_config_folder_path; std::atomic m_last_hr_merge_time; std::atomic m_hashes; + std::atomic m_total_hashes; std::atomic m_current_hash_rate; epee::critical_section m_last_hash_rates_lock; std::list m_last_hash_rates; bool m_do_print_hashrate; bool m_do_mining; + std::vector> m_threads_autodetect; + boost::thread::attributes m_attrs; // background mining stuffs .. -- cgit v1.2.3