Show the number of transactions in pool job

Useful to check if pool/proxy is working properly and can also be used to compare different pools.
This commit is contained in:
SChernykh 2021-08-07 19:38:31 +02:00
parent d24581c963
commit 929205536c
3 changed files with 36 additions and 3 deletions

View file

@ -274,7 +274,7 @@ void xmrig::Network::setJob(IClient *client, const Job &job, bool donate)
if (!BenchState::size())
# endif
{
uint64_t diff = job.diff();;
uint64_t diff = job.diff();
const char *scale = NetworkState::scaleDiff(diff);
char zmq_buf[32] = {};
@ -282,8 +282,14 @@ void xmrig::Network::setJob(IClient *client, const Job &job, bool donate)
snprintf(zmq_buf, sizeof(zmq_buf), " (ZMQ:%d)", client->pool().zmq_port());
}
LOG_INFO("%s " MAGENTA_BOLD("new job") " from " WHITE_BOLD("%s:%d%s") " diff " WHITE_BOLD("%" PRIu64 "%s") " algo " WHITE_BOLD("%s") " height " WHITE_BOLD("%" PRIu64),
Tags::network(), client->pool().host().data(), client->pool().port(), zmq_buf, diff, scale, job.algorithm().shortName(), job.height());
char tx_buf[32] = {};
const uint32_t num_transactions = job.getNumTransactions();
if (num_transactions > 0) {
snprintf(tx_buf, sizeof(tx_buf), " (%u tx)", num_transactions);
}
LOG_INFO("%s " MAGENTA_BOLD("new job") " from " WHITE_BOLD("%s:%d%s") " diff " WHITE_BOLD("%" PRIu64 "%s") " algo " WHITE_BOLD("%s") " height " WHITE_BOLD("%" PRIu64) "%s",
Tags::network(), client->pool().host().data(), client->pool().port(), zmq_buf, diff, scale, job.algorithm().shortName(), job.height(), tx_buf);
}
if (!donate && m_donate) {