daemon: add --public-node mode, RPC port propagation over P2P

This commit is contained in:
xiphon 2019-02-24 08:47:49 +00:00
parent 31bdf7bd11
commit 551104fbf1
20 changed files with 147 additions and 30 deletions

View file

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

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;