Better cache cleanup

This commit is contained in:
SChernykh
2022-10-04 17:51:40 +02:00
parent eabf856dbd
commit 45674ef554
4 changed files with 142 additions and 49 deletions
+6
View File
@@ -170,7 +170,10 @@ SideChain::SideChain(p2pool* pool, NetworkType type, const char* pool_name)
// Use between 1 and 8 threads
if (numThreads < 1) numThreads = 1;
#ifndef _DEBUG
if (numThreads > 8) numThreads = 8;
#endif
LOGINFO(4, "running " << numThreads << " pre-calculation workers");
@@ -2128,6 +2131,9 @@ void SideChain::finish_precalc()
LOGERR(1, "exception in finish_precalc(): " << e.what());
}
// Also clear cache because it has data from all old blocks now
clear_crypto_cache();
#ifdef DEV_TEST_SYNC
if (m_pool) {
LOGINFO(0, log::LightGreen() << "[DEV] Synchronization finished successfully, stopping P2Pool now");