git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
4ad19b6
)
More than one samples seems enough.
author
CryptoManiac
<balthazar@yandex.ru>
Tue, 22 Sep 2015 19:40:44 +0000 (22:40 +0300)
committer
CryptoManiac
<balthazar@yandex.ru>
Tue, 22 Sep 2015 19:40:44 +0000 (22:40 +0300)
src/ntp.cpp
patch
|
blob
|
history
diff --git
a/src/ntp.cpp
b/src/ntp.cpp
index
60cc309
..
84f3301
100644
(file)
--- 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++)