| 672 | } |
| 673 | |
| 674 | void 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 | |
| 694 | std::pair<CAddress, NodeSeconds> AddrManImpl::Select_(bool new_only, const std::unordered_set<Network>& networks) const |
| 695 | { |