aboutsummaryrefslogtreecommitdiff
path: root/src/timedata.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-03-30 09:31:32 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-03-30 09:31:51 +0200
commit352fd577291e2638452e121e5b96a9cb1c164465 (patch)
tree65ee2b030de92aa40f9642c9fc7f2726b90aadaf /src/timedata.cpp
parent5131005e5b26d12b5b3f79c1c3f8ee08172fc386 (diff)
parente1523cee5808bb792cd99f037f06b736af4e23fb (diff)
downloadbitcoin-352fd577291e2638452e121e5b96a9cb1c164465.tar.xz
Merge #7573: P2P: add maxtimeadjustment command line option
e1523ce P2P: add maxtimeadjustment command line option (mruddy)
Diffstat (limited to 'src/timedata.cpp')
-rw-r--r--src/timedata.cpp2
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;
}