From df328e4ec7e709e387863dddbf05afea24ad0a13 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 21 Feb 2021 01:43:52 -0500 Subject: [PATCH] Print wallet address when 'c' is pressed --- src/base/net/stratum/NetworkState.cpp | 2 ++ src/base/net/stratum/NetworkState.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/base/net/stratum/NetworkState.cpp b/src/base/net/stratum/NetworkState.cpp index 9e78801..8c85fdd 100644 --- a/src/base/net/stratum/NetworkState.cpp +++ b/src/base/net/stratum/NetworkState.cpp @@ -193,6 +193,7 @@ void xmrig::NetworkState::printConnection() const } Log::print(MAGENTA_BOLD_S " - CONNECTION"); + Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-17s") WHITE_BOLD("%s"), "wallet", m_user); Log::print(GREEN_BOLD(" * ") WHITE_BOLD("%-17s") CYAN_BOLD("%s ") BLACK_BOLD("(%s) ") GREEN_BOLD("%s"), "pool address", m_pool, m_ip.data(), m_tls.isNull() ? "" : m_tls.data()); @@ -265,6 +266,7 @@ std::string xmrig::NetworkState::humanDiff(uint64_t diff) void xmrig::NetworkState::onActive(IStrategy *strategy, IClient *client) { snprintf(m_pool, sizeof(m_pool) - 1, "%s:%d", client->pool().host().data(), client->pool().port()); + snprintf(m_user, sizeof(m_user) - 1, "%s", client->pool().user().data()); m_ip = client->ip(); m_tls = client->tlsVersion(); diff --git a/src/base/net/stratum/NetworkState.h b/src/base/net/stratum/NetworkState.h index 8fa1fed..d74653c 100644 --- a/src/base/net/stratum/NetworkState.h +++ b/src/base/net/stratum/NetworkState.h @@ -75,6 +75,7 @@ private: Algorithm m_algorithm; bool m_active = false; char m_pool[256]{}; + char m_user[256]{}; std::array m_topDiff { { } }; std::vector m_latency; String m_fingerprint;