Unit tests for difficulty_type

This commit is contained in:
SChernykh
2021-09-03 11:12:22 +02:00
parent b26c4616d7
commit 2d8530798d
7 changed files with 400 additions and 0 deletions

View File

@@ -234,7 +234,9 @@ private:
std::ofstream m_logFile;
};
#ifndef P2POOL_LOG_DISABLE
static Worker worker;
#endif
NOINLINE Writer::Writer(Severity severity) : Stream(m_stackBuf)
{
@@ -252,7 +254,9 @@ NOINLINE Writer::~Writer()
m_buf[1] = static_cast<uint8_t>(size & 255);
m_buf[2] = static_cast<uint8_t>(size >> 8);
m_buf[m_pos] = '\n';
#ifndef P2POOL_LOG_DISABLE
worker.write(m_buf, size);
#endif
}
void reopen()
@@ -263,7 +267,9 @@ void reopen()
void stop()
{
#ifndef P2POOL_LOG_DISABLE
worker.stop();
#endif
}
NOINLINE void Stream::writeCurrentTime()