Skip to content
Permalink
Browse files

Release dataset om stop_mining

  • Loading branch information...
hyc committed Jun 9, 2019
1 parent 8d22b01 commit d8bc1fe5c784b7436844cca2f24d3be324fac1d7
Showing with 9 additions and 0 deletions.
  1. +7 −0 src/crypto/rx-slow-hash.c
  2. +2 −0 src/cryptonote_basic/miner.cpp
@@ -347,3 +347,10 @@ void rx_slow_hash_free_state(void) {
rx_vm = NULL;
}
}

void rx_stop_mining(void) {
if (rx_dataset != NULL) {
randomx_release_dataset(rx_dataset);
rx_dataset = NULL;
}
}
@@ -434,6 +434,7 @@ namespace cryptonote
{
boost::interprocess::ipcdetail::atomic_write32(&m_stop, 1);
}
extern "C" void rx_stop_mining(void);
//-----------------------------------------------------------------------------------------------------
bool miner::stop()
{
@@ -466,6 +467,7 @@ namespace cryptonote
MINFO("Mining has been stopped, " << m_threads.size() << " finished" );
m_threads.clear();
m_threads_autodetect.clear();
rx_stop_mining();
return true;
}
//-----------------------------------------------------------------------------------------------------

0 comments on commit d8bc1fe

Please sign in to comment.
You can’t perform that action at this time.