diff --git a/src/main.cpp b/src/main.cpp index d38b44377..7e1d506e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6979,6 +6979,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, BOOST_FOREACH(CAddress& addr, vAddr) { boost::this_thread::interruption_point(); + fprintf(stderr,"%s: %s.nTime=%d\n", __func__, pfrom->addr.ToString().c_str(), addr.nTime); if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60) addr.nTime = nNow - 5 * 24 * 60 * 60; diff --git a/src/net.cpp b/src/net.cpp index 25ee6dc3f..808df788c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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; }