diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-02-04 15:41:58 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-02-23 12:22:32 +0000 |
commit | 8298f42e9d9c4d81792d7ab344efbe424e9b9ba2 (patch) | |
tree | 9305abebceb9b334347a6288906f25c972bb15ae /src/cryptonote_basic/miner.h | |
parent | Merge pull request #4988 (diff) | |
download | monero-8298f42e9d9c4d81792d7ab344efbe424e9b9ba2.tar.xz |
miner: it can now autodetect the optimal number of threads
Diffstat (limited to '')
-rw-r--r-- | src/cryptonote_basic/miner.h | 5 |
1 files changed, 5 insertions, 0 deletions
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<blobdata> m_extra_messages; miner_config m_config; std::string m_config_folder_path; std::atomic<uint64_t> m_last_hr_merge_time; std::atomic<uint64_t> m_hashes; + std::atomic<uint64_t> m_total_hashes; std::atomic<uint64_t> m_current_hash_rate; epee::critical_section m_last_hash_rates_lock; std::list<uint64_t> m_last_hash_rates; bool m_do_print_hashrate; bool m_do_mining; + std::vector<std::pair<uint64_t, uint64_t>> m_threads_autodetect; + boost::thread::attributes m_attrs; // background mining stuffs .. |