mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 03:03:17 +00:00
Merge pull request #6283
a84131ce
p2p: fix off by one adding fallback peers (moneromooo-monero)
This commit is contained in:
commit
e160e0b517
1 changed files with 2 additions and 2 deletions
|
@ -1552,14 +1552,14 @@ namespace nodetool
|
||||||
if (!m_fallback_seed_nodes_added)
|
if (!m_fallback_seed_nodes_added)
|
||||||
{
|
{
|
||||||
MWARNING("Failed to connect to any of seed peers, trying fallback seeds");
|
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))
|
for (const auto &peer: get_seed_nodes(m_nettype))
|
||||||
{
|
{
|
||||||
MDEBUG("Fallback seed node: " << peer);
|
MDEBUG("Fallback seed node: " << peer);
|
||||||
append_net_address(m_seed_nodes, peer, cryptonote::get_config(m_nettype).P2P_DEFAULT_PORT);
|
append_net_address(m_seed_nodes, peer, cryptonote::get_config(m_nettype).P2P_DEFAULT_PORT);
|
||||||
}
|
}
|
||||||
m_fallback_seed_nodes_added = true;
|
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");
|
MWARNING("No fallback seeds, continuing without seeds");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue