aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorMarko Bencun <marko.bencun@monetas.net>2017-06-01 11:07:08 +0200
committerMarko Bencun <marko.bencun@monetas.net>2017-06-15 23:06:12 +0200
commitce79f3251851f6177f38009341802e6065cb70af (patch)
tree9ec347e23680be4583838e22a72940ab0cc33422 /src/net.cpp
parentc2ab38bdd57a16e6c708dcc633d9162331c9d311 (diff)
add WhitelistedRange to CConnman::Options
Part of a series of changes to clean up the instantiation of connman by decoupling the command line arguments.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 73f020273b..cc4341e29f 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -601,7 +601,6 @@ void CConnman::SetBannedSetDirty(bool dirty)
bool CConnman::IsWhitelistedRange(const CNetAddr &addr) {
- LOCK(cs_vWhitelistedRange);
for (const CSubNet& subnet : vWhitelistedRange) {
if (subnet.Match(addr))
return true;
@@ -609,12 +608,6 @@ bool CConnman::IsWhitelistedRange(const CNetAddr &addr) {
return false;
}
-void CConnman::AddWhitelistedRange(const CSubNet &subnet) {
- LOCK(cs_vWhitelistedRange);
- vWhitelistedRange.push_back(subnet);
-}
-
-
std::string CNode::GetAddrName() const {
LOCK(cs_addrName);
return addrName;
@@ -2248,6 +2241,8 @@ bool CConnman::Start(CScheduler& scheduler, std::string& strNodeError, Options c
SetBestHeight(connOptions.nBestHeight);
+ vWhitelistedRange = connOptions.vWhitelistedRange;
+
for (const auto& strDest : connOptions.vSeedNodes) {
AddOneShot(strDest);
}