From 3e0306f6467d51fd4ede6dca8c056c843b273ab4 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Sun, 6 Feb 2022 17:29:00 +0000 Subject: [PATCH] Increased minPeerConnectionTime and maxPeerConnectionTime to reduce the chances of forced connections during relays. An alternate option would be to avoid force disconnecting while relays are in progress, but some nodes could have active relays 100% of the time and therefore would never recycle their peers. So it is simpler to just increase the average peer connection time for everyone. --- src/main/java/org/qortal/settings/Settings.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/qortal/settings/Settings.java b/src/main/java/org/qortal/settings/Settings.java index 41b69114..dd62189f 100644 --- a/src/main/java/org/qortal/settings/Settings.java +++ b/src/main/java/org/qortal/settings/Settings.java @@ -202,9 +202,9 @@ public class Settings { private boolean allowConnectionsWithOlderPeerVersions = true; /** Minimum time (in seconds) that we should attempt to remain connected to a peer for */ - private int minPeerConnectionTime = 2 * 60; // seconds + private int minPeerConnectionTime = 5 * 60; // seconds /** Maximum time (in seconds) that we should attempt to remain connected to a peer for */ - private int maxPeerConnectionTime = 20 * 60; // seconds + private int maxPeerConnectionTime = 60 * 60; // seconds /** Whether to sync multiple blocks at once in normal operation */ private boolean fastSyncEnabled = true;