Manages the set of known peer addresses (the address manager).
Synopsis
Declared in <addrman.h>
class AddrMan;
Member Functions
Name |
Description |
|
Constructs an address manager over the given network group mapping. |
|
Destroys the address manager and its underlying tables. |
Attempt to add one or more addresses to addrman's new table. If an address already exists in addrman, the existing entry may be updated (e.g. adding additional service flags). If the existing entry is in the new table, it may be added to more buckets, improving the probability of selection. |
|
Mark an entry as connection attempted to. |
|
We have successfully connected to this peer. Calling this function updates the CAddress's nTime, which is used in our IsTerrible() decisions and gossiped to peers. Callers should be careful that updating this information doesn't leak topology information to network spies. |
|
Test‐only function Find the address record in AddrMan and return information about its position. |
|
Return all or many randomly selected addresses, optionally by network. |
|
Returns an information‐location pair for all addresses in the selected addrman table. If an address appears multiple times in the new table, an information‐location pair is returned for each occurrence. Addresses only ever appear once in the tried table. |
|
Mark an address record as accessible and attempt to move it to addrman's tried table. |
|
See if any to‐be‐evicted tried table entries have been tested and if so resolve the collisions. |
|
Choose an address to connect to. |
|
Randomly select an address in the tried table that another address is attempting to evict. |
|
Serializes the entire address manager state to a stream. |
|
Update an entry's service bits. |
|
Return size information about addrman. |
|
Deserializes the address manager state from a stream. |
Protected Data Members
Name |
Description |
Owning pointer to the private implementation holding the address tables. |
Non-Member Functions
Name |
Description |
Get the address manager from a node context, asserting it is present. |
|
Get the address manager from an opaque RPC context, asserting it is present. |
|
Reads peer addresses from a stream into the address manager. |
Created with MrDocs