Merge pull request #5573

c07bbd5 daemon: fix 'never seen before' time span display for peers (moneromooo-monero)
This commit is contained in:
luigi1111 2019-07-24 14:13:33 -05:00
commit 5cecf4138b
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -54,7 +54,7 @@ namespace {
std::string id_str; std::string id_str;
std::string port_str; std::string port_str;
std::string elapsed = epee::misc_utils::get_time_interval_string(now - last_seen); std::string elapsed = peer.last_seen == 0 ? "never" : epee::misc_utils::get_time_interval_string(now - last_seen);
std::string ip_str = epee::string_tools::get_ip_string_from_int32(peer.ip); std::string ip_str = epee::string_tools::get_ip_string_from_int32(peer.ip);
std::stringstream peer_id_str; std::stringstream peer_id_str;
peer_id_str << std::hex << std::setw(16) << peer.id; peer_id_str << std::hex << std::setw(16) << peer.id;