mirror of
https://github.com/monero-project/monero.git
synced 2025-05-04 18:34:59 -04:00
miner: it can now autodetect the optimal number of threads
This commit is contained in:
parent
31bdf7bd11
commit
8298f42e9d
4 changed files with 96 additions and 9 deletions
|
@ -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 ..
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue