Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
CBanEntry Class Reference

#include <addrdb.h>

Public Member Functions

 CBanEntry ()
 
 CBanEntry (int64_t nCreateTimeIn)
 
 CBanEntry (const UniValue &json)
 Create a ban entry from JSON. More...
 
 SERIALIZE_METHODS (CBanEntry, obj)
 
void SetNull ()
 
UniValue ToJson () const
 Generate a JSON representation of this ban entry. More...
 

Public Attributes

int nVersion
 
int64_t nCreateTime
 
int64_t nBanUntil
 

Static Public Attributes

static const int CURRENT_VERSION =1
 

Detailed Description

Definition at line 21 of file addrdb.h.

Constructor & Destructor Documentation

◆ CBanEntry() [1/3]

CBanEntry::CBanEntry ( )
inline

Definition at line 29 of file addrdb.h.

Here is the call graph for this function:

◆ CBanEntry() [2/3]

CBanEntry::CBanEntry ( int64_t  nCreateTimeIn)
inlineexplicit

Definition at line 34 of file addrdb.h.

Here is the call graph for this function:

◆ CBanEntry() [3/3]

CBanEntry::CBanEntry ( const UniValue json)
explicit

Create a ban entry from JSON.

Parameters
[in]jsonA JSON representation of a ban entry, as created by ToJson().
Exceptions
std::runtime_errorif the JSON does not have the expected fields.

Definition at line 22 of file addrdb.cpp.

Member Function Documentation

◆ SERIALIZE_METHODS()

CBanEntry::SERIALIZE_METHODS ( CBanEntry  ,
obj   
)
inline

For backward compatibility

Definition at line 47 of file addrdb.h.

◆ SetNull()

void CBanEntry::SetNull ( )
inline

Definition at line 53 of file addrdb.h.

Here is the caller graph for this function:

◆ ToJson()

UniValue CBanEntry::ToJson ( ) const

Generate a JSON representation of this ban entry.

Returns
JSON suitable for passing to the CBanEntry(const UniValue&) constructor.

Definition at line 28 of file addrdb.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ CURRENT_VERSION

const int CBanEntry::CURRENT_VERSION =1
static

Definition at line 24 of file addrdb.h.

◆ nBanUntil

int64_t CBanEntry::nBanUntil

Definition at line 27 of file addrdb.h.

◆ nCreateTime

int64_t CBanEntry::nCreateTime

Definition at line 26 of file addrdb.h.

◆ nVersion

int CBanEntry::nVersion

Definition at line 25 of file addrdb.h.


The documentation for this class was generated from the following files: