aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-13 11:20:49 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-13 11:20:49 +0000
commit523371c04264f8420281444d1d33a5249220dfa5 (patch)
treefec27e17f6a8dde3cf186ec1ba2e1c1f6ba33783 /src
parentMerge pull request #3368 (diff)
downloadmonero-523371c04264f8420281444d1d33a5249220dfa5.tar.xz
p2p: fix network ID being uninitialised when using exclusive peers
Diffstat (limited to 'src')
-rw-r--r--src/p2p/net_node.inl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index 8ef240326..54875e619 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -422,9 +422,11 @@ namespace nodetool
memcpy(&m_network_id, &::config::stagenet::NETWORK_ID, 16);
full_addrs = get_seed_nodes(cryptonote::STAGENET);
}
- else if (m_exclusive_peers.empty())
+ else
{
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
// add the result addresses as seed nodes
// TODO: at some point add IPv6 support, but that won't be relevant
@@ -505,6 +507,7 @@ namespace nodetool
full_addrs.insert(peer);
}
}
+ }
for (const auto& full_addr : full_addrs)
{