aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2019-02-24 08:47:49 +0000
committerxiphon <xiphon@protonmail.com>2019-02-25 02:40:23 +0300
commit551104fbf1d2d82cad57d5ea240d1b7be2810ea1 (patch)
treef6ee718c60963bab82468c577f1705eef54b7768 /src/cryptonote_protocol
parentMerge pull request #4988 (diff)
downloadmonero-551104fbf1d2d82cad57d5ea240d1b7be2810ea1.tar.xz
daemon: add --public-node mode, RPC port propagation over P2P
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_defs.h2
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_defs.h b/src/cryptonote_protocol/cryptonote_protocol_defs.h
index c49371d48..16c9e42e8 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_defs.h
+++ b/src/cryptonote_protocol/cryptonote_protocol_defs.h
@@ -53,6 +53,7 @@ namespace cryptonote
std::string host;
std::string ip;
std::string port;
+ uint16_t rpc_port;
std::string peer_id;
@@ -88,6 +89,7 @@ namespace cryptonote
KV_SERIALIZE(host)
KV_SERIALIZE(ip)
KV_SERIALIZE(port)
+ KV_SERIALIZE(rpc_port)
KV_SERIALIZE(peer_id)
KV_SERIALIZE(recv_count)
KV_SERIALIZE(recv_idle_time)
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index c1459cbb6..1c5a8e401 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -231,6 +231,7 @@ namespace cryptonote
cnx.ip = cnx.host;
cnx.port = std::to_string(cntxt.m_remote_address.as<epee::net_utils::ipv4_network_address>().port());
}
+ cnx.rpc_port = cntxt.m_rpc_port;
std::stringstream peer_id_str;
peer_id_str << std::hex << std::setw(16) << peer_id;