aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarko Bencun <marko.bencun@monetas.net>2017-09-11 16:13:46 +0200
committerMarko Bencun <marko.bencun@monetas.net>2017-09-11 16:17:01 +0200
commit605918272cd806d0ee77a391d00360b925a5fab3 (patch)
treeda5a5c406400bc339918f67c2d3cbb56a82daab5 /src
parent16e41844e7d6c5876d2caaeef6010656950c6ec5 (diff)
add m_added_nodes to connman options
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp1
-rw-r--r--src/net.cpp5
-rw-r--r--src/net.h2
3 files changed, 3 insertions, 5 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 6230eafb6d..c611c07e4e 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1656,6 +1656,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
connOptions.m_msgproc = peerLogic.get();
connOptions.nSendBufferMaxSize = 1000*gArgs.GetArg("-maxsendbuffer", DEFAULT_MAXSENDBUFFER);
connOptions.nReceiveFloodSize = 1000*gArgs.GetArg("-maxreceivebuffer", DEFAULT_MAXRECEIVEBUFFER);
+ connOptions.m_added_nodes = gArgs.GetArgs("-addnode");
connOptions.nMaxOutboundTimeframe = nMaxOutboundTimeframe;
connOptions.nMaxOutboundLimit = nMaxOutboundLimit;
diff --git a/src/net.cpp b/src/net.cpp
index 587c9e5110..042bb0bb05 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1897,11 +1897,6 @@ std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo()
void CConnman::ThreadOpenAddedConnections()
{
- {
- LOCK(cs_vAddedNodes);
- vAddedNodes = gArgs.GetArgs("-addnode");
- }
-
while (true)
{
CSemaphoreGrant grant(*semAddnode);
diff --git a/src/net.h b/src/net.h
index ca2433aa54..92d829dd42 100644
--- a/src/net.h
+++ b/src/net.h
@@ -147,6 +147,7 @@ public:
std::vector<CService> vBinds, vWhiteBinds;
bool m_use_addrman_outgoing = true;
std::vector<std::string> m_specified_outgoing;
+ std::vector<std::string> m_added_nodes;
};
void Init(const Options& connOptions) {
@@ -164,6 +165,7 @@ public:
nMaxOutboundTimeframe = connOptions.nMaxOutboundTimeframe;
nMaxOutboundLimit = connOptions.nMaxOutboundLimit;
vWhitelistedRange = connOptions.vWhitelistedRange;
+ vAddedNodes = connOptions.m_added_nodes;
}
CConnman(uint64_t seed0, uint64_t seed1);