aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2017-10-05 13:35:20 -0400
committerCarl Dong <accounts@carldong.me>2019-01-16 13:54:18 -0500
commit2e56702ecedd83c4b7cb8de9de5c437c8c08e645 (patch)
tree8ceb655d5556a7b97a6362d1940e5b8ae0a307e0 /src/net.h
parent4c0d961eb0d7825a1e6f8389d7f5545114ee18c6 (diff)
downloadbitcoin-2e56702ecedd83c4b7cb8de9de5c437c8c08e645.tar.xz
banman: pass the banfile path in
There's no need to hard-code the path here. Passing it in means that there are no ordering concerns wrt establishing the datadir.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 020e600b2c..5e6fc14b38 100644
--- a/src/net.h
+++ b/src/net.h
@@ -133,7 +133,7 @@ public:
// between nodes running old code and nodes running
// new code.
~BanMan();
- BanMan(CClientUIInterface* client_interface);
+ BanMan(fs::path ban_file, CClientUIInterface* client_interface);
void Ban(const CNetAddr& netAddr, const BanReason& reason, int64_t bantimeoffset = 0, bool sinceUnixEpoch = false);
void Ban(const CSubNet& subNet, const BanReason& reason, int64_t bantimeoffset = 0, bool sinceUnixEpoch = false);
void ClearBanned(); // needed for unit testing
@@ -156,6 +156,7 @@ private:
CCriticalSection cs_setBanned;
bool setBannedIsDirty;
CClientUIInterface* clientInterface = nullptr;
+ CBanDB m_ban_db;
};
class NetEventsInterface;