[#BanMan]
= BanMan
:mrdocs:

Tracks banned and discouraged peers&period;

== Synopsis

Declared in `&lt;banman&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class BanMan;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BanMan/2constructor.adoc[`BanMan`]         [.small]#[constructor]#
| Constructs the ban manager and loads any existing banlist from disk&period;
| xref:BanMan/2destructor.adoc[`&#126;BanMan`] [.small]#[destructor]#
| Flushes the banlist to disk if dirty and destroys the manager&period;
| xref:BanMan/Ban-0a.adoc[`Ban`] 
| `Ban` overloads
| xref:BanMan/ClearBanned.adoc[`ClearBanned`] 
| Removes all bans from memory and marks the banlist dirty&period;
| xref:BanMan/Discourage.adoc[`Discourage`] 
| Marks an address as discouraged, preferring it for eviction&period;
| xref:BanMan/DumpBanlist.adoc[`DumpBanlist`] 
| Writes the current banlist to disk&period;
| xref:BanMan/GetBanned.adoc[`GetBanned`] 
| Copies the current set of bans into the given map&period;
| xref:BanMan/IsBanned-07.adoc[`IsBanned`] 
| `IsBanned` overloads
| xref:BanMan/IsDiscouraged.adoc[`IsDiscouraged`] 
| Return whether net&lowbar;addr is discouraged&period;
| xref:BanMan/Unban-0d.adoc[`Unban`] 
| `Unban` overloads
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:EnsureAnyBanman.adoc[`EnsureAnyBanman`]
| Get the ban manager from an opaque RPC context, asserting it is present&period;
| xref:EnsureBanman.adoc[`EnsureBanman`]
| Get the ban manager from a node context, asserting it is present&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
