mirror of https://github.com/oxen-io/oxen-core.git
Release dataset om stop_mining
This commit is contained in:
parent
8d22b01dca
commit
d8bc1fe5c7
|
@ -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;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue