Skip to content

Commit

Permalink
Better error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
SChernykh committed Sep 13, 2023
1 parent 2248739 commit a9d39f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/p2p_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ void P2PServer::check_host()
for (const PoolBlock* b = side_chain.chainTip(); b && (b->m_txinGenHeight >= height + 2); b = side_chain.find_block(b->m_parent)) {
if (--counter == 0) {
const Params::Host& host = m_pool->current_host();
LOGERR(1, host.m_displayName << " seems to be stuck, reconnecting");
LOGERR(1, "Host " << host.m_displayName << " seems to be stuck, reconnecting");
m_pool->reconnect_to_host();
return;
}
Expand All @@ -1237,7 +1237,7 @@ void P2PServer::check_host()
if (cur_time >= last_active + 300) {
const uint64_t dt = static_cast<uint64_t>(cur_time - last_active);
const Params::Host& host = m_pool->current_host();
LOGERR(1, "no ZMQ messages received from " << host.m_displayName << " in the last " << dt << " seconds, check your monerod/p2pool/network/firewall setup!!!");
LOGERR(1, "no ZMQ messages received from host " << host.m_displayName << " in the last " << dt << " seconds, check your monerod/p2pool/network/firewall setup!!!");
m_pool->reconnect_to_host();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/p2pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ void p2pool::get_info()
[this, host](const char* data, size_t size, double)
{
if (size > 0) {
LOGWARN(1, "get_info RPC request to " << host.m_displayName << " failed: error " << log::const_buf(data, size) << ", trying again in 1 second");
LOGWARN(1, "get_info RPC request to host " << host.m_displayName << " failed: error " << log::const_buf(data, size) << ", trying again in 1 second");
if (!m_stopped) {
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
switch_host();
Expand Down Expand Up @@ -1107,7 +1107,7 @@ void p2pool::get_miner_data(bool retry)
[this, host, retry](const char* data, size_t size, double)
{
if (size > 0) {
LOGWARN(1, "get_miner_data RPC request to " << host.m_displayName << " failed: error " << log::const_buf(data, size) << (retry ? ", trying again in 1 second" : ""));
LOGWARN(1, "get_miner_data RPC request to host " << host.m_displayName << " failed: error " << log::const_buf(data, size) << (retry ? ", trying again in 1 second" : ""));
if (!m_stopped && retry) {
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
m_getMinerDataPending = false;
Expand Down

0 comments on commit a9d39f0

Please sign in to comment.