setban: rewrite to UniValue, allow absolute bantime

This commit is contained in:
Jonas Schnelli
2015-06-12 18:31:47 +02:00
committed by Jack Grigg
parent 63c06b232b
commit fcc8920f36
6 changed files with 46 additions and 25 deletions

View File

@@ -615,8 +615,8 @@ public:
static void ClearBanned(); // needed for unit testing
static bool IsBanned(CNetAddr ip);
static bool IsBanned(CSubNet subnet);
static void Ban(const CNetAddr &ip, int64_t bantimeoffset = 0);
static void Ban(const CSubNet &subNet, int64_t bantimeoffset = 0);
static void Ban(const CNetAddr &ip, int64_t bantimeoffset = 0, bool sinceUnixEpoch = false);
static void Ban(const CSubNet &subNet, int64_t bantimeoffset = 0, bool sinceUnixEpoch = false);
static bool Unban(const CNetAddr &ip);
static bool Unban(const CSubNet &ip);
static void GetBanned(std::map<CSubNet, int64_t> &banmap);