Print wallet address when 'c' is pressed

This commit is contained in:
Thomas Muller 2021-02-21 01:43:52 -05:00
parent f17674e836
commit df328e4ec7
Signed by: thomas
GPG key ID: AF006EB730564952
2 changed files with 3 additions and 0 deletions

View file

@ -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();

View file

@ -75,6 +75,7 @@ private:
Algorithm m_algorithm;
bool m_active = false;
char m_pool[256]{};
char m_user[256]{};
std::array<uint64_t, 10> m_topDiff { { } };
std::vector<uint16_t> m_latency;
String m_fingerprint;