Litecoin: Reduce amount that peers can adjust our time to eliminate an attack vector.
This commit is contained in:
parent
2db43142bc
commit
5e17fcb020
@ -1318,7 +1318,7 @@ void AddTimeData(const CNetAddr& ip, int64 nTime)
|
||||
int64 nMedian = vTimeOffsets.median();
|
||||
std::vector<int64> 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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user