mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 06:38:53 +00:00
p2p: fix off by one adding fallback peers
The code would ignore the first one to be added
This commit is contained in:
parent
907292dfb4
commit
a84131cea3
@ -1555,14 +1555,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;
|
||||
|
Loading…
Reference in New Issue
Block a user