aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2019-06-04 18:39:17 +0000
committerxiphon <xiphon@protonmail.com>2019-06-04 19:33:35 +0000
commitcf8cb6873ab88427d20248a6b0a098f547c374c5 (patch)
treea1735eef1b10fd44b489d320df6c641de208b8e5 /src
parentMerge pull request #5548 (diff)
downloadmonero-cf8cb6873ab88427d20248a6b0a098f547c374c5.tar.xz
rpc: use ip address string representation for peer::host field
Diffstat (limited to 'src')
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index cfe4bbf23..9ea81ce34 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -29,6 +29,9 @@
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
#pragma once
+
+#include "string_tools.h"
+
#include "cryptonote_protocol/cryptonote_protocol_defs.h"
#include "cryptonote_basic/cryptonote_basic.h"
#include "cryptonote_basic/difficulty.h"
@@ -1198,7 +1201,7 @@ namespace cryptonote
: id(id), host(host), ip(0), port(0), rpc_port(rpc_port), last_seen(last_seen), pruning_seed(pruning_seed)
{}
peer(uint64_t id, uint32_t ip, uint16_t port, uint64_t last_seen, uint32_t pruning_seed, uint16_t rpc_port)
- : id(id), host(std::to_string(ip)), ip(ip), port(port), rpc_port(rpc_port), last_seen(last_seen), pruning_seed(pruning_seed)
+ : id(id), host(epee::string_tools::get_ip_string_from_int32(ip)), ip(ip), port(port), rpc_port(rpc_port), last_seen(last_seen), pruning_seed(pruning_seed)
{}
BEGIN_KV_SERIALIZE_MAP()