diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2023-01-11 12:12:28 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2023-01-11 12:12:28 -0500 |
| commit | 1d20b8171d6f12961b0d01b2ed1cb87b87f66f58 (patch) | |
| tree | 7664ebe01bb197e9cdb99b72c32d24331a163816 /src/cryptonote_basic | |
| parent | b0ea7cb528cac2ddfeafacde7927ea20433947e8 (diff) | |
| parent | f698f2b708be742afa286c65868a48f7ef80b0ba (diff) | |
| download | monzero-core-1d20b8171d6f12961b0d01b2ed1cb87b87f66f58.tar.gz monzero-core-1d20b8171d6f12961b0d01b2ed1cb87b87f66f58.tar.xz monzero-core-1d20b8171d6f12961b0d01b2ed1cb87b87f66f58.zip | |
Merge pull request #8678
f698f2b Refactored rx-slow-hash.c (SChernykh)
Diffstat (limited to 'src/cryptonote_basic')
| -rw-r--r-- | src/cryptonote_basic/miner.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 5b0db9518..98f1555b6 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -82,6 +82,7 @@ using namespace epee; #include "miner.h" +#include "crypto/hash.h" extern "C" void slow_hash_allocate_state(); @@ -436,7 +437,6 @@ namespace cryptonote { m_stop = true; } - extern "C" void rx_stop_mining(void); //----------------------------------------------------------------------------------------------------- bool miner::stop() { @@ -469,7 +469,6 @@ namespace cryptonote MINFO("Mining has been stopped, " << m_threads.size() << " finished" ); m_threads.clear(); m_threads_autodetect.clear(); - rx_stop_mining(); return true; } //----------------------------------------------------------------------------------------------------- @@ -524,6 +523,8 @@ namespace cryptonote bool miner::worker_thread() { const uint32_t th_local_index = m_thread_index++; // atomically increment, getting value before increment + 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) + "]"); MGINFO("Miner thread was started ["<< th_local_index << "]"); uint32_t nonce = m_starter_nonce + th_local_index; |
