mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 10:01:02 +00:00
miner: add a debug log in pause and resume
This commit is contained in:
parent
c9063c0b8f
commit
a38343bf68
1 changed files with 2 additions and 0 deletions
|
@ -377,6 +377,7 @@ namespace cryptonote
|
||||||
void miner::pause()
|
void miner::pause()
|
||||||
{
|
{
|
||||||
CRITICAL_REGION_LOCAL(m_miners_count_lock);
|
CRITICAL_REGION_LOCAL(m_miners_count_lock);
|
||||||
|
MDEBUG("miner::pause: " << m_pausers_count << " -> " << (m_pausers_count + 1));
|
||||||
++m_pausers_count;
|
++m_pausers_count;
|
||||||
if(m_pausers_count == 1 && is_mining())
|
if(m_pausers_count == 1 && is_mining())
|
||||||
MDEBUG("MINING PAUSED");
|
MDEBUG("MINING PAUSED");
|
||||||
|
@ -385,6 +386,7 @@ namespace cryptonote
|
||||||
void miner::resume()
|
void miner::resume()
|
||||||
{
|
{
|
||||||
CRITICAL_REGION_LOCAL(m_miners_count_lock);
|
CRITICAL_REGION_LOCAL(m_miners_count_lock);
|
||||||
|
MDEBUG("miner::resume: " << m_pausers_count << " -> " << (m_pausers_count - 1));
|
||||||
--m_pausers_count;
|
--m_pausers_count;
|
||||||
if(m_pausers_count < 0)
|
if(m_pausers_count < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue