Show Monero node in status

This commit is contained in:
SChernykh
2023-01-27 17:42:00 +01:00
parent c989bdb0ea
commit 25d083ef25
4 changed files with 21 additions and 6 deletions
+12
View File
@@ -65,6 +65,8 @@ p2pool::p2pool(int argc, char* argv[])
throw std::exception();
}
m_hostStr = m_params->m_host;
if (m_params->m_socks5Proxy.empty()) {
if (m_params->m_dns) {
bool is_v6;
@@ -79,6 +81,16 @@ p2pool::p2pool(int argc, char* argv[])
}
}
{
const bool changed = (m_params->m_host != m_hostStr);
const std::string rpc_port = ':' + std::to_string(m_params->m_rpcPort);
const std::string zmq_port = ":ZMQ:" + std::to_string(m_params->m_zmqPort);
m_hostStr += rpc_port + zmq_port;
if (changed) {
m_hostStr += " (" + m_params->m_host + ')';
}
}
hash pub, sec, eph_public_key;
generate_keys(pub, sec);