From 238ede94193ddd1a932189a134b344f4b03ce809 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Wed, 22 Jan 2020 16:37:07 +0100 Subject: [PATCH] Only correct time if we have at least 9 connected peers --- src/Connection/ConnectionServer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Connection/ConnectionServer.py b/src/Connection/ConnectionServer.py index f2765d58..55be636d 100644 --- a/src/Connection/ConnectionServer.py +++ b/src/Connection/ConnectionServer.py @@ -360,7 +360,7 @@ class ConnectionServer(object): for connection in self.connections if connection.handshake.get("time") and connection.last_ping_delay ]) - if len(corrections) < 6: + if len(corrections) < 9: return 0.0 mid = int(len(corrections) / 2 - 1) median = (corrections[mid - 1] + corrections[mid] + corrections[mid + 1]) / 3