Skip to content

Commit e8b9347

Browse files
committed
[net] remove unused return type bool from CNode::Ban()
1 parent 1086ffb commit e8b9347

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/net.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,16 +458,14 @@ bool CNode::IsBanned(CNetAddr ip)
458458
return fResult;
459459
}
460460

461-
bool CNode::Ban(const CNetAddr &addr, int64_t bantimeoffset) {
461+
void CNode::Ban(const CNetAddr &addr, int64_t bantimeoffset) {
462462
int64_t banTime = GetTime()+GetArg("-bantime", 60*60*24); // Default 24-hour ban
463463
if (bantimeoffset > 0)
464464
banTime = GetTime()+bantimeoffset;
465465

466466
LOCK(cs_setBanned);
467467
if (setBanned[addr] < banTime)
468468
setBanned[addr] = banTime;
469-
470-
return true;
471469
}
472470

473471
bool CNode::Unban(const CNetAddr &addr) {

src/net.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ class CNode
606606
// new code.
607607
static void ClearBanned(); // needed for unit testing
608608
static bool IsBanned(CNetAddr ip);
609-
static bool Ban(const CNetAddr &ip, int64_t bantimeoffset = 0);
609+
static void Ban(const CNetAddr &ip, int64_t bantimeoffset = 0);
610610
static bool Unban(const CNetAddr &ip);
611611
static void GetBanned(std::map<CNetAddr, int64_t> &banmap);
612612

0 commit comments

Comments
 (0)