Fixed data races in miner

This commit is contained in:
SChernykh
2022-04-09 18:08:37 +02:00
parent 21d8cb917b
commit 2a77695832
5 changed files with 39 additions and 13 deletions

View File

@@ -35,7 +35,7 @@ namespace p2pool {
Miner::Miner(p2pool* pool, uint32_t threads)
: m_pool(pool)
, m_threads(threads)
, m_stopped(false)
, m_stopped{ false }
, m_startTimestamp(high_resolution_clock::now())
, m_nonce(0)
, m_nonceTimestamp(m_startTimestamp)
@@ -43,7 +43,7 @@ Miner::Miner(p2pool* pool, uint32_t threads)
, m_totalHashes(0)
, m_sharesFound(0)
, m_job{}
, m_jobIndex(0)
, m_jobIndex{ 0 }
{
on_block(m_pool->block_template());