aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/addrman.h b/src/addrman.h
index 2135295b89..d176d0a42c 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -171,13 +171,23 @@ public:
//! See if any to-be-evicted tried table entries have been tested and if so resolve the collisions.
void ResolveCollisions();
- //! Randomly select an address in tried that another address is attempting to evict.
- CAddrInfo SelectTriedCollision();
+ /**
+ * Randomly select an address in the tried table that another address is
+ * attempting to evict.
+ *
+ * @return CAddress The record for the selected tried peer.
+ * int64_t The last time we attempted to connect to that peer.
+ */
+ std::pair<CAddress, int64_t> SelectTriedCollision();
/**
* Choose an address to connect to.
+ *
+ * @param[in] newOnly Whether to only select addresses from the new table.
+ * @return CAddress The record for the selected peer.
+ * int64_t The last time we attempted to connect to that peer.
*/
- CAddrInfo Select(bool newOnly = false) const;
+ std::pair<CAddress, int64_t> Select(bool newOnly = false) const;
/**
* Return all or many randomly selected addresses, optionally by network.