From 5e17fcb0200c9cf36315b401dc24f8a92b36b1da Mon Sep 17 00:00:00 2001 From: coblee Date: Fri, 28 Oct 2011 20:34:19 -1000 Subject: [PATCH] Litecoin: Reduce amount that peers can adjust our time to eliminate an attack vector. --- src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 4c9b897f5..91ce7b331 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1318,7 +1318,7 @@ void AddTimeData(const CNetAddr& ip, int64 nTime) int64 nMedian = vTimeOffsets.median(); std::vector vSorted = vTimeOffsets.sorted(); // Only let other nodes change our time by so much - if (abs64(nMedian) < 70 * 60) + if (abs64(nMedian) < 35 * 60) // Litecoin: changed maximum adjust to 35 mins to avoid letting peers change our time too much in case of an attack. { nTimeOffset = nMedian; }