mirror of https://github.com/oxen-io/oxen-core.git
DEVNET storage port fixes
On devnet we don't have a storage server, and so storage ports are left uninitialized and effectively become random ports on the network. This initializes them to 0, and avoids comparing SS ports for devnet for the duplicate ip/ports warning.
This commit is contained in:
parent
acf2942859
commit
a8a3b3dbe6
|
@ -2289,7 +2289,8 @@ namespace cryptonote
|
|||
|
||||
m_service_node_list.for_each_service_node_info_and_proof(sn_pks.begin(), sn_pks.end(), [&](auto& pk, auto& sni, auto& proof) {
|
||||
if (pk != m_service_keys.pub && proof.proof->public_ip == m_sn_public_ip &&
|
||||
(proof.proof->qnet_port == m_quorumnet_port || proof.proof->storage_https_port == storage_https_port() || proof.proof->storage_omq_port == storage_omq_port()))
|
||||
(proof.proof->qnet_port == m_quorumnet_port || (
|
||||
m_nettype != network_type::DEVNET && (proof.proof->storage_https_port == storage_https_port() || proof.proof->storage_omq_port == storage_omq_port()))))
|
||||
MGINFO_RED(
|
||||
"Another service node (" << pk << ") is broadcasting the same public IP and ports as this service node (" <<
|
||||
epee::string_tools::get_ip_string_from_int32(m_sn_public_ip) << ":" << proof.proof->qnet_port << "[qnet], :" <<
|
||||
|
|
|
@ -975,7 +975,7 @@ namespace cryptonote
|
|||
|
||||
/// Time point at which the storage server and lokinet last pinged us
|
||||
std::atomic<time_t> m_last_storage_server_ping, m_last_lokinet_ping;
|
||||
std::atomic<uint16_t> m_storage_https_port, m_storage_omq_port;
|
||||
std::atomic<uint16_t> m_storage_https_port{0}, m_storage_omq_port{0};
|
||||
|
||||
uint32_t sn_public_ip() const { return m_sn_public_ip; }
|
||||
uint16_t storage_https_port() const { return m_storage_https_port; }
|
||||
|
|
Loading…
Reference in New Issue