diff options
author | mruddy <mruddy@users.noreply.github.com> | 2016-03-29 14:40:00 +0000 |
---|---|---|
committer | mruddy <mruddy@users.noreply.github.com> | 2016-03-29 14:40:00 +0000 |
commit | e1523cee5808bb792cd99f037f06b736af4e23fb (patch) | |
tree | 76b37d4fc920953cc55e611b8a6a7e0d3364ba5e /src/timedata.cpp | |
parent | b35a59179359709df21eb026d35f4124ce90fbd1 (diff) |
P2P: add maxtimeadjustment command line option
Diffstat (limited to 'src/timedata.cpp')
-rw-r--r-- | src/timedata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timedata.cpp b/src/timedata.cpp index 4d2f8d1e3b..b6bcf86fbf 100644 --- a/src/timedata.cpp +++ b/src/timedata.cpp @@ -83,7 +83,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample) int64_t nMedian = vTimeOffsets.median(); std::vector<int64_t> vSorted = vTimeOffsets.sorted(); // Only let other nodes change our time by so much - if (abs64(nMedian) < 70 * 60) + if (abs64(nMedian) <= std::max<int64_t>(0, GetArg("-maxtimeadjustment", DEFAULT_MAX_TIME_ADJUSTMENT))) { nTimeOffset = nMedian; } |