diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 7a8677e0e0..1ca66c68d7 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3651,7 +3651,11 @@ void PeerManagerImpl::ProcessMessage( int64_t nTimeOffset = nTime - GetTime(); pfrom.nTimeOffset = nTimeOffset; - AddTimeData(pfrom.addr, nTimeOffset); + if (!pfrom.IsInboundConn()) { + // Don't use timedata samples from inbound peers to make it + // harder for others to tamper with our adjusted time. + AddTimeData(pfrom.addr, nTimeOffset); + } // Feeler connections exist only to verify if address is online. if (pfrom.IsFeelerConn()) {