Litecoin: Reduce amount that peers can adjust our time to eliminate an attack vector.

This commit is contained in:
coblee 2011-10-28 20:34:19 -10:00 committed by Warren Togami
parent 7383ef5364
commit 7b0e39430b

View File

@ -77,7 +77,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nTime)
int64_t nMedian = vTimeOffsets.median(); int64_t nMedian = vTimeOffsets.median();
std::vector<int64_t> vSorted = vTimeOffsets.sorted(); std::vector<int64_t> vSorted = vTimeOffsets.sorted();
// Only let other nodes change our time by so much // Only let other nodes change our time by so much
if (abs64(nMedian) < 70 * 60) if (abs64(nMedian) < 35 * 60)
{ {
nTimeOffset = nMedian; nTimeOffset = nMedian;
} }