mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
bootstrap tweaks
This commit is contained in:
parent
9d8e4b28f2
commit
3aa1c7fded
6
core.cpp
6
core.cpp
|
@ -225,9 +225,9 @@ void Core::start()
|
||||||
* 5 disconnected; 4 were DCd for less than 20 ticks, while the 5th was ~50 ticks.
|
* 5 disconnected; 4 were DCd for less than 20 ticks, while the 5th was ~50 ticks.
|
||||||
* So I set the tolerance here at 25, and initial DCs should be very rare now.
|
* So I set the tolerance here at 25, and initial DCs should be very rare now.
|
||||||
* This should be able to go to 50 or 100 without affecting legitimate disconnects'
|
* This should be able to go to 50 or 100 without affecting legitimate disconnects'
|
||||||
* downtime, but lets be conservative for now.
|
* downtime, but lets be conservative for now. Edit: now 40.
|
||||||
*/
|
*/
|
||||||
#define CORE_DISCONNECT_TOLERANCE 25
|
#define CORE_DISCONNECT_TOLERANCE 40
|
||||||
|
|
||||||
void Core::process()
|
void Core::process()
|
||||||
{
|
{
|
||||||
|
@ -284,7 +284,7 @@ void Core::bootstrapDht()
|
||||||
qDebug() << "Core: Bootstraping to the DHT ...";
|
qDebug() << "Core: Bootstraping to the DHT ...";
|
||||||
|
|
||||||
int i=0;
|
int i=0;
|
||||||
while (i < 4)
|
while (i < 2) // i think the more we bootstrap, the more we jitter because the more we overwrite nodes
|
||||||
{
|
{
|
||||||
const Settings::DhtServer& dhtServer = dhtServerList[j % listSize];
|
const Settings::DhtServer& dhtServer = dhtServerList[j % listSize];
|
||||||
if (tox_bootstrap_from_address(tox, dhtServer.address.toLatin1().data(),
|
if (tox_bootstrap_from_address(tox, dhtServer.address.toLatin1().data(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user