File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -458,16 +458,14 @@ bool CNode::IsBanned(CNetAddr ip)
458
458
return fResult ;
459
459
}
460
460
461
- bool CNode::Ban (const CNetAddr &addr, int64_t bantimeoffset) {
461
+ void CNode::Ban (const CNetAddr &addr, int64_t bantimeoffset) {
462
462
int64_t banTime = GetTime ()+GetArg (" -bantime" , 60 *60 *24 ); // Default 24-hour ban
463
463
if (bantimeoffset > 0 )
464
464
banTime = GetTime ()+bantimeoffset;
465
465
466
466
LOCK (cs_setBanned);
467
467
if (setBanned[addr] < banTime)
468
468
setBanned[addr] = banTime;
469
-
470
- return true ;
471
469
}
472
470
473
471
bool CNode::Unban (const CNetAddr &addr) {
Original file line number Diff line number Diff line change @@ -606,7 +606,7 @@ class CNode
606
606
// new code.
607
607
static void ClearBanned (); // needed for unit testing
608
608
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 );
610
610
static bool Unban (const CNetAddr &ip);
611
611
static void GetBanned (std::map<CNetAddr, int64_t > &banmap);
612
612
You can’t perform that action at this time.
0 commit comments