diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 861753e7d38326..0155ee43d28747 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3569,7 +3569,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()) {