Merge pull request #5190

551104fb daemon: add --public-node mode, RPC port propagation over P2P (xiphon)
This commit is contained in:
Riccardo Spagni 2019-03-17 17:56:04 +02:00
commit 848591c4d8
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
20 changed files with 147 additions and 30 deletions

View file

@ -54,6 +54,7 @@ namespace cryptonote
std::string host;
std::string ip;
std::string port;
uint16_t rpc_port;
std::string peer_id;
@ -89,6 +90,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)

View file

@ -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;