From 42e0d352076bd0997fb8532e56a489abec2730f3 Mon Sep 17 00:00:00 2001 From: XMRig Date: Mon, 11 Feb 2019 06:22:20 +0700 Subject: [PATCH] Show height only if it specified by pool. --- src/net/Network.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/net/Network.cpp b/src/net/Network.cpp index 7445c465..08e96d1d 100644 --- a/src/net/Network.cpp +++ b/src/net/Network.cpp @@ -175,9 +175,16 @@ bool Network::isColors() const void Network::setJob(Client *client, const Job &job, bool donate) { - LOG_INFO(isColors() ? MAGENTA_BOLD("new job") " from " WHITE_BOLD("%s:%d") " diff " WHITE_BOLD("%d") " algo " WHITE_BOLD("%s") " height " WHITE_BOLD("%llu") - : "new job from %s:%d diff %d algo %s height %llu", - client->host(), client->port(), job.diff(), job.algorithm().shortName(), job.height()); + if (job.height()) { + LOG_INFO(isColors() ? MAGENTA_BOLD("new job") " from " WHITE_BOLD("%s:%d") " diff " WHITE_BOLD("%d") " algo " WHITE_BOLD("%s") " height " WHITE_BOLD("%" PRIu64) + : "new job from %s:%d diff %d algo %s height %" PRIu64, + client->host(), client->port(), job.diff(), job.algorithm().shortName(), job.height()); + } + else { + LOG_INFO(isColors() ? MAGENTA_BOLD("new job") " from " WHITE_BOLD("%s:%d") " diff " WHITE_BOLD("%d") " algo " WHITE_BOLD("%s") + : "new job from %s:%d diff %d algo %s", + client->host(), client->port(), job.diff(), job.algorithm().shortName()); + } if (!donate && m_donate) { m_donate->setAlgo(job.algorithm());