From 100f0fef9528c03cfaa55ab39c3fbf8f84ea3c14 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Tue, 22 Sep 2015 22:40:44 +0300 Subject: [PATCH] More than one samples seems enough. --- src/ntp.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ntp.cpp b/src/ntp.cpp index 60cc309..84f3301 100644 --- a/src/ntp.cpp +++ b/src/ntp.cpp @@ -478,11 +478,11 @@ void ThreadNtpSamples(void* parg) { } } - if (vTimeOffsets.size() > 2) { + if (vTimeOffsets.size() > 1) { nNtpOffset = vTimeOffsets.median(); } else { - // Not enough offsets yet, try again later. + // Not enough offsets yet, try to collect additional samples later. nNtpOffset = INT64_MAX; int nSleepMinutes = 1 + GetRandInt(4); // Sleep for 1-5 minutes. for (int i = 0; i < nSleepMinutes * 60 && !fShutdown; i++) -- 1.7.1