MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Attempt_

Method Attempt_

src/addrman.cpp:674–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674void AddrManImpl::Attempt_(const CService& addr, bool fCountFailure, NodeSeconds time)
675{
676 AssertLockHeld(cs);
677
678 AddrInfo* pinfo = Find(addr);
679
680 // if not found, bail out
681 if (!pinfo)
682 return;
683
684 AddrInfo& info = *pinfo;
685
686 // update info
687 info.m_last_try = time;
688 if (fCountFailure && info.m_last_count_attempt < m_last_good) {
689 info.m_last_count_attempt = time;
690 info.nAttempts++;
691 }
692}
693
694std::pair<CAddress, NodeSeconds> AddrManImpl::Select_(bool new_only, const std::unordered_set<Network>& networks) const
695{

Callers

nothing calls this directly

Calls 1

FindFunction · 0.85

Tested by

no test coverage detected