@@ -227,49 +227,22 @@ class AddrManImpl
227
227
// ! Move an entry from the "new" table(s) to the "tried" table
228
228
void MakeTried (CAddrInfo& info, int nId) EXCLUSIVE_LOCKS_REQUIRED(cs);
229
229
230
- // ! Mark an entry "good", possibly moving it from "new" to "tried".
231
230
void Good_ (const CService &addr, bool test_before_evict, int64_t time) EXCLUSIVE_LOCKS_REQUIRED(cs);
232
231
233
- // ! Add an entry to the "new" table.
234
232
bool Add_ (const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty) EXCLUSIVE_LOCKS_REQUIRED(cs);
235
233
236
- // ! Mark an entry as attempted to connect.
237
234
void Attempt_ (const CService &addr, bool fCountFailure , int64_t nTime) EXCLUSIVE_LOCKS_REQUIRED(cs);
238
235
239
- // ! Select an address to connect to, if newOnly is set to true, only the new table is selected from.
240
236
std::pair<CAddress, int64_t > Select_ (bool newOnly) const EXCLUSIVE_LOCKS_REQUIRED(cs);
241
237
242
- /* *
243
- * Return all or many randomly selected addresses, optionally by network.
244
- *
245
- * @param[in] max_addresses Maximum number of addresses to return (0 = all).
246
- * @param[in] max_pct Maximum percentage of addresses to return (0 = all).
247
- * @param[in] network Select only addresses of this network (nullopt = all).
248
- *
249
- * @returns A vector of randomly selected addresses from vRandom.
250
- */
251
238
std::vector<CAddress> GetAddr_ (size_t max_addresses, size_t max_pct, std::optional<Network> network) const EXCLUSIVE_LOCKS_REQUIRED(cs);
252
239
253
- /* * We have successfully connected to this peer. Calling this function
254
- * updates the CAddress's nTime, which is used in our IsTerrible()
255
- * decisions and gossiped to peers. Callers should be careful that updating
256
- * this information doesn't leak topology information to network spies.
257
- *
258
- * net_processing calls this function when it *disconnects* from a peer to
259
- * not leak information about currently connected peers.
260
- *
261
- * @param[in] addr The address of the peer we were connected to
262
- * @param[in] nTime The time that we were last connected to this peer
263
- */
264
240
void Connected_ (const CService& addr, int64_t nTime) EXCLUSIVE_LOCKS_REQUIRED(cs);
265
241
266
- // ! Update an entry's service bits.
267
242
void SetServices_ (const CService &addr, ServiceFlags nServices) EXCLUSIVE_LOCKS_REQUIRED(cs);
268
243
269
- // ! See if any to-be-evicted tried table entries have been tested and if so resolve the collisions.
270
244
void ResolveCollisions_ () EXCLUSIVE_LOCKS_REQUIRED(cs);
271
245
272
- // ! Return a random to-be-evicted tried table address.
273
246
std::pair<CAddress, int64_t > SelectTriedCollision_ () EXCLUSIVE_LOCKS_REQUIRED(cs);
274
247
275
248
// ! Consistency check, taking into account m_consistency_check_ratio. Will std::abort if an inconsistency is detected.
0 commit comments