From e8b93473f12ec901f965cd244a7437646ee66c43 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Tue, 19 May 2015 17:15:25 +0200 Subject: [PATCH] [net] remove unused return type bool from CNode::Ban() --- src/net.cpp | 4 +--- src/net.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index 51d1c5333..a065bb29b 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -458,7 +458,7 @@ bool CNode::IsBanned(CNetAddr ip) 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 if (bantimeoffset > 0) banTime = GetTime()+bantimeoffset; @@ -466,8 +466,6 @@ bool CNode::Ban(const CNetAddr &addr, int64_t bantimeoffset) { LOCK(cs_setBanned); if (setBanned[addr] < banTime) setBanned[addr] = banTime; - - return true; } bool CNode::Unban(const CNetAddr &addr) { diff --git a/src/net.h b/src/net.h index dd6fca396..ee3da16aa 100644 --- a/src/net.h +++ b/src/net.h @@ -606,7 +606,7 @@ public: // new code. static void ClearBanned(); // needed for unit testing 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 void GetBanned(std::map &banmap);