Anti p2p fingerprinting via nTime

This commit is contained in:
Duke Leto
2021-04-16 01:16:40 -04:00
parent e48ffbe455
commit 2ea5dcb048
2 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Copyright (c) 2016-2020 The Hush developers
// Copyright (c) 2016-2021 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
/******************************************************************************
@@ -212,8 +212,10 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer)
{
ret = CAddress(addr);
}
//TODO: option to set custom services
ret.nServices = nLocalServices;
ret.nTime = GetTime();
// Round to the nearest 5 min window to avoid fingerprinting -- Duke
ret.nTime = GetTime() - (GetTime() % 300);
return ret;
}