refactor: Use NodeClock alias over deprecated GetTime
What changed, and why it matters
This is a one-line code cleanup in Bitcoin Core. It replaces an older way of getting the current time with a newer, type-correct equivalent. The commit message explicitly says it does not change behavior, and the diff shows only that single replacement with no logic changes.
No security action needed. Treat as normal code maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In src/net_processing.cpp::PushNodeVersion, the code previously called GetTime
Changed components
src/net_processing.cppPeerManagerImpl::PushNodeVersionInspect captured patch +1 / −1
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 28d7d2c1..6377e3fa 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1564,7 +1564,7 @@ void PeerManagerImpl::PushNodeVersion(CNode& pnode, const Peer& peer)
} else {
const CAddress& addr{pnode.addr};
my_services = peer.m_our_services;
- my_time = count_seconds(GetTime<std::chrono::seconds>());
+ my_time = TicksSinceEpoch<std::chrono::seconds>(NodeClock::now());
your_services = addr.nServices;
your_addr = addr.IsRoutable() && !IsProxy(addr) && addr.IsAddrV1Compatible() ? CService{addr} : CService{};
my_user_agent = strSubVersion;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.