[net] remove unused return type bool from CNode::Ban()
This commit is contained in:
parent
1086ffba26
commit
e8b93473f1
@ -458,7 +458,7 @@ bool CNode::IsBanned(CNetAddr ip)
|
|||||||
return fResult;
|
return fResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CNode::Ban(const CNetAddr &addr, int64_t bantimeoffset) {
|
void CNode::Ban(const CNetAddr &addr, int64_t bantimeoffset) {
|
||||||
int64_t banTime = GetTime()+GetArg("-bantime", 60*60*24); // Default 24-hour ban
|
int64_t banTime = GetTime()+GetArg("-bantime", 60*60*24); // Default 24-hour ban
|
||||||
if (bantimeoffset > 0)
|
if (bantimeoffset > 0)
|
||||||
banTime = GetTime()+bantimeoffset;
|
banTime = GetTime()+bantimeoffset;
|
||||||
@ -466,8 +466,6 @@ bool CNode::Ban(const CNetAddr &addr, int64_t bantimeoffset) {
|
|||||||
LOCK(cs_setBanned);
|
LOCK(cs_setBanned);
|
||||||
if (setBanned[addr] < banTime)
|
if (setBanned[addr] < banTime)
|
||||||
setBanned[addr] = banTime;
|
setBanned[addr] = banTime;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CNode::Unban(const CNetAddr &addr) {
|
bool CNode::Unban(const CNetAddr &addr) {
|
||||||
|
@ -606,7 +606,7 @@ public:
|
|||||||
// new code.
|
// new code.
|
||||||
static void ClearBanned(); // needed for unit testing
|
static void ClearBanned(); // needed for unit testing
|
||||||
static bool IsBanned(CNetAddr ip);
|
static bool IsBanned(CNetAddr ip);
|
||||||
static bool Ban(const CNetAddr &ip, int64_t bantimeoffset = 0);
|
static void Ban(const CNetAddr &ip, int64_t bantimeoffset = 0);
|
||||||
static bool Unban(const CNetAddr &ip);
|
static bool Unban(const CNetAddr &ip);
|
||||||
static void GetBanned(std::map<CNetAddr, int64_t> &banmap);
|
static void GetBanned(std::map<CNetAddr, int64_t> &banmap);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user