Fixed potential deadlock

Can't lock `m_minerLock` inside SideChain update
This commit is contained in:
SChernykh
2022-07-14 13:14:20 +02:00
parent 0e7c1aa481
commit 3c697c2d7e
3 changed files with 17 additions and 16 deletions
+1 -4
View File
@@ -1539,7 +1539,7 @@ void SideChain::update_chain_tip(const PoolBlock* block)
block->m_wantBroadcast = true;
if (m_pool) {
m_pool->update_block_template_async();
m_pool->update_block_template_async(is_alternative);
// Reset stratum share counters when switching to an alternative chain to avoid confusion
if (is_alternative) {
@@ -1547,9 +1547,6 @@ void SideChain::update_chain_tip(const PoolBlock* block)
if (s) {
s->reset_share_counters();
}
#ifdef WITH_RANDOMX
m_pool->reset_miner();
#endif
LOGINFO(0, log::LightCyan() << "SYNCHRONIZED");
}
}