use rx_set_miner_thread after RX_BLOCK_VERSION

This commit is contained in:
wowario 2023-02-13 22:54:24 +03:00
parent 3f78176f3d
commit b414a0659d
No known key found for this signature in database
GPG Key ID: 793504B449C69220
1 changed files with 5 additions and 2 deletions

View File

@ -557,7 +557,11 @@ namespace cryptonote
bool miner::worker_thread() bool miner::worker_thread()
{ {
const uint32_t th_local_index = m_thread_index++; // atomically increment, getting value before increment const uint32_t th_local_index = m_thread_index++; // atomically increment, getting value before increment
bool rx_set = false; block b;
if (b.major_version >= RX_BLOCK_VERSION)
{
crypto::rx_set_miner_thread(th_local_index, tools::get_max_concurrency());
}
MLOG_SET_THREAD_NAME(std::string("[miner ") + std::to_string(th_local_index) + "]"); MLOG_SET_THREAD_NAME(std::string("[miner ") + std::to_string(th_local_index) + "]");
MGINFO_GREEN("*Spins roulette wheel*... Mining started. Good luck!"); MGINFO_GREEN("*Spins roulette wheel*... Mining started. Good luck!");
@ -565,7 +569,6 @@ namespace cryptonote
uint64_t height = 0; uint64_t height = 0;
difficulty_type local_diff = 0; difficulty_type local_diff = 0;
uint32_t local_template_ver = 0; uint32_t local_template_ver = 0;
block b;
slow_hash_allocate_state(); slow_hash_allocate_state();
++m_threads_active; ++m_threads_active;
while(!m_stop) while(!m_stop)