Fixed Coverity issue

This commit is contained in:
SChernykh 2022-11-24 08:43:13 +01:00
parent 2721b16c46
commit d4180a5084

View file

@ -2142,6 +2142,9 @@ void SideChain::finish_precalc()
uv_mutex_destroy(&m_precalcJobsMutex); uv_mutex_destroy(&m_precalcJobsMutex);
uv_cond_destroy(&m_precalcJobsCond); uv_cond_destroy(&m_precalcJobsCond);
// Also clear cache because it has data from all old blocks now
clear_crypto_cache();
LOGINFO(4, "pre-calculation workers stopped"); LOGINFO(4, "pre-calculation workers stopped");
} }
catch (const std::exception& e) catch (const std::exception& e)
@ -2149,9 +2152,6 @@ void SideChain::finish_precalc()
LOGERR(1, "exception in finish_precalc(): " << e.what()); 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 #ifdef DEV_TEST_SYNC
if (m_pool) { if (m_pool) {
LOGINFO(0, log::LightGreen() << "[DEV] Synchronization finished successfully, stopping P2Pool now"); LOGINFO(0, log::LightGreen() << "[DEV] Synchronization finished successfully, stopping P2Pool now");