P2P: give peers from --addpeers a 2-second headstart before connecting to other peers

This commit is contained in:
SChernykh
2025-11-22 13:24:03 +01:00
parent 3584910baa
commit 3d2c9910f8
+3 -2
View File
@@ -1297,11 +1297,12 @@ void P2PServer::on_timer()
return; return;
} }
++m_timerCounter; const uint64_t t = ++m_timerCounter;
if (!m_initialPeerList.empty()) { if ((t == 1) && !m_initialPeerList.empty()) {
connect_to_peers(m_initialPeerList); connect_to_peers(m_initialPeerList);
m_initialPeerList.clear(); m_initialPeerList.clear();
return;
} }
flush_cache(); flush_cache();