miner: add a debug log in pause and resume

This commit is contained in:
moneromooo-monero 2017-03-31 20:01:58 +01:00
parent c9063c0b8f
commit a38343bf68
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -377,6 +377,7 @@ namespace cryptonote
void miner::pause()
{
CRITICAL_REGION_LOCAL(m_miners_count_lock);
MDEBUG("miner::pause: " << m_pausers_count << " -> " << (m_pausers_count + 1));
++m_pausers_count;
if(m_pausers_count == 1 && is_mining())
MDEBUG("MINING PAUSED");
@ -385,6 +386,7 @@ namespace cryptonote
void miner::resume()
{
CRITICAL_REGION_LOCAL(m_miners_count_lock);
MDEBUG("miner::resume: " << m_pausers_count << " -> " << (m_pausers_count - 1));
--m_pausers_count;
if(m_pausers_count < 0)
{