mirror of
https://github.com/monero-project/monero.git
synced 2024-12-15 04:46:31 +02:00
p2p: fix network ID being uninitialised when using exclusive peers
This commit is contained in:
parent
e9f41e405f
commit
523371c042
@ -422,9 +422,11 @@ namespace nodetool
|
|||||||
memcpy(&m_network_id, &::config::stagenet::NETWORK_ID, 16);
|
memcpy(&m_network_id, &::config::stagenet::NETWORK_ID, 16);
|
||||||
full_addrs = get_seed_nodes(cryptonote::STAGENET);
|
full_addrs = get_seed_nodes(cryptonote::STAGENET);
|
||||||
}
|
}
|
||||||
else if (m_exclusive_peers.empty())
|
else
|
||||||
{
|
{
|
||||||
memcpy(&m_network_id, &::config::NETWORK_ID, 16);
|
memcpy(&m_network_id, &::config::NETWORK_ID, 16);
|
||||||
|
if (m_exclusive_peers.empty())
|
||||||
|
{
|
||||||
// for each hostname in the seed nodes list, attempt to DNS resolve and
|
// for each hostname in the seed nodes list, attempt to DNS resolve and
|
||||||
// add the result addresses as seed nodes
|
// add the result addresses as seed nodes
|
||||||
// TODO: at some point add IPv6 support, but that won't be relevant
|
// TODO: at some point add IPv6 support, but that won't be relevant
|
||||||
@ -505,6 +507,7 @@ namespace nodetool
|
|||||||
full_addrs.insert(peer);
|
full_addrs.insert(peer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto& full_addr : full_addrs)
|
for (const auto& full_addr : full_addrs)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user