mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-13 00:54:53 +01:00
addrman: Use system time instead of adjusted network time
This commit is contained in:
@@ -2930,7 +2930,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
// indicate to the peer that we will participate in addr relay.
|
||||
if (fListen && !m_chainman.ActiveChainstate().IsInitialBlockDownload())
|
||||
{
|
||||
CAddress addr{GetLocalAddress(pfrom.addr), peer->m_our_services, AdjustedTime()};
|
||||
CAddress addr{GetLocalAddress(pfrom.addr), peer->m_our_services, Now<NodeSeconds>()};
|
||||
FastRandomContext insecure_rand;
|
||||
if (addr.IsRoutable())
|
||||
{
|
||||
@@ -3135,7 +3135,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
|
||||
// Store the new addresses
|
||||
std::vector<CAddress> vAddrOk;
|
||||
const auto current_a_time{AdjustedTime()};
|
||||
const auto current_a_time{Now<NodeSeconds>()};
|
||||
|
||||
// Update/increment addr rate limiting bucket.
|
||||
const auto current_time{GetTime<std::chrono::microseconds>()};
|
||||
@@ -4683,7 +4683,7 @@ void PeerManagerImpl::MaybeSendAddr(CNode& node, Peer& peer, std::chrono::micros
|
||||
peer.m_addr_known->reset();
|
||||
}
|
||||
if (std::optional<CService> local_service = GetLocalAddrForPeer(node)) {
|
||||
CAddress local_addr{*local_service, peer.m_our_services, AdjustedTime()};
|
||||
CAddress local_addr{*local_service, peer.m_our_services, Now<NodeSeconds>()};
|
||||
FastRandomContext insecure_rand;
|
||||
PushAddress(peer, local_addr, insecure_rand);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user