BanMan

Tracks banned and discouraged peers.

Synopsis

Declared in <banman.h>

class BanMan;

Member Functions

NameDescription
BanMan [constructor]Constructs the ban manager and loads any existing banlist from disk.
~BanMan [destructor]Flushes the banlist to disk if dirty and destroys the manager.
Ban Ban overloads
ClearBanned Removes all bans from memory and marks the banlist dirty.
Discourage Marks an address as discouraged, preferring it for eviction.
DumpBanlist Writes the current banlist to disk.
GetBanned Copies the current set of bans into the given map.
IsBanned IsBanned overloads
IsDiscouraged Return whether net_addr is discouraged.
Unban Unban overloads

Non-Member Functions

NameDescription
EnsureAnyBanmanGet the ban manager from an opaque RPC context, asserting it is present.
EnsureBanmanGet the ban manager from a node context, asserting it is present.