Tracks banned and discouraged peers.

Synopsis

Declared in <banman.h>

class BanMan;

Member Functions

Name

Description

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

Name

Description

EnsureAnyBanman

Get the ban manager from an opaque RPC context, asserting it is present.

EnsureBanman

Get the ban manager from a node context, asserting it is present.

Created with MrDocs