diff options
| author | mruddy <[email protected]> | 2016-03-29 14:40:00 +0000 |
|---|---|---|
| committer | mruddy <[email protected]> | 2016-03-29 14:40:00 +0000 |
| commit | e1523cee5808bb792cd99f037f06b736af4e23fb (patch) | |
| tree | 76b37d4fc920953cc55e611b8a6a7e0d3364ba5e /src/timedata.cpp | |
| parent | Merge #7558: [RPC] Add import/removeprunedfunds rpc call (diff) | |
| download | discoin-e1523cee5808bb792cd99f037f06b736af4e23fb.tar.xz discoin-e1523cee5808bb792cd99f037f06b736af4e23fb.zip | |
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 4d2f8d1e3..b6bcf86fb 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; } |