mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Remove CBanEntry::SetNull
This commit is contained in:
parent
fab53ff1e5
commit
fa3bd9de99
1 changed files with 6 additions and 19 deletions
25
src/addrdb.h
25
src/addrdb.h
|
@ -19,21 +19,15 @@ class CDataStream;
|
|||
class CBanEntry
|
||||
{
|
||||
public:
|
||||
static const int CURRENT_VERSION=1;
|
||||
int nVersion;
|
||||
int64_t nCreateTime;
|
||||
int64_t nBanUntil;
|
||||
static constexpr int CURRENT_VERSION{1};
|
||||
int nVersion{CBanEntry::CURRENT_VERSION};
|
||||
int64_t nCreateTime{0};
|
||||
int64_t nBanUntil{0};
|
||||
|
||||
CBanEntry()
|
||||
{
|
||||
SetNull();
|
||||
}
|
||||
CBanEntry() {}
|
||||
|
||||
explicit CBanEntry(int64_t nCreateTimeIn)
|
||||
{
|
||||
SetNull();
|
||||
nCreateTime = nCreateTimeIn;
|
||||
}
|
||||
: nCreateTime{nCreateTimeIn} {}
|
||||
|
||||
/**
|
||||
* Create a ban entry from JSON.
|
||||
|
@ -42,13 +36,6 @@ public:
|
|||
*/
|
||||
explicit CBanEntry(const UniValue& json);
|
||||
|
||||
void SetNull()
|
||||
{
|
||||
nVersion = CBanEntry::CURRENT_VERSION;
|
||||
nCreateTime = 0;
|
||||
nBanUntil = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a JSON representation of this ban entry.
|
||||
* @return JSON suitable for passing to the `CBanEntry(const UniValue&)` constructor.
|
||||
|
|
Loading…
Add table
Reference in a new issue