aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.inl
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-03-27 12:19:54 -0700
committerAlexander Blair <snipa@jagtech.io>2020-03-27 12:19:55 -0700
commite160e0b51713d5fc3be7b16553dd4754ce3369ed (patch)
tree3a6b02c11ed9d48ced09d3edfc73b573a31bc544 /src/p2p/net_node.inl
parentMerge pull request #6282 (diff)
parentp2p: fix off by one adding fallback peers (diff)
downloadmonero-e160e0b51713d5fc3be7b16553dd4754ce3369ed.tar.xz
Merge pull request #6283
a84131ce p2p: fix off by one adding fallback peers (moneromooo-monero)
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r--src/p2p/net_node.inl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index dec652054..71a067ac5 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -1552,14 +1552,14 @@ namespace nodetool
if (!m_fallback_seed_nodes_added)
{
MWARNING("Failed to connect to any of seed peers, trying fallback seeds");
- current_index = m_seed_nodes.size();
+ current_index = m_seed_nodes.size() - 1;
for (const auto &peer: get_seed_nodes(m_nettype))
{
MDEBUG("Fallback seed node: " << peer);
append_net_address(m_seed_nodes, peer, cryptonote::get_config(m_nettype).P2P_DEFAULT_PORT);
}
m_fallback_seed_nodes_added = true;
- if (current_index == m_seed_nodes.size())
+ if (current_index == m_seed_nodes.size() - 1)
{
MWARNING("No fallback seeds, continuing without seeds");
break;