Skip to content

Commit 6059182

Browse files
author
Marko Bencun
committed
add m_added_nodes to connman options
1 parent 16e4184 commit 6059182

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/init.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
16561656
connOptions.m_msgproc = peerLogic.get();
16571657
connOptions.nSendBufferMaxSize = 1000*gArgs.GetArg("-maxsendbuffer", DEFAULT_MAXSENDBUFFER);
16581658
connOptions.nReceiveFloodSize = 1000*gArgs.GetArg("-maxreceivebuffer", DEFAULT_MAXRECEIVEBUFFER);
1659+
connOptions.m_added_nodes = gArgs.GetArgs("-addnode");
16591660

16601661
connOptions.nMaxOutboundTimeframe = nMaxOutboundTimeframe;
16611662
connOptions.nMaxOutboundLimit = nMaxOutboundLimit;

src/net.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,11 +1897,6 @@ std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo()
18971897

18981898
void CConnman::ThreadOpenAddedConnections()
18991899
{
1900-
{
1901-
LOCK(cs_vAddedNodes);
1902-
vAddedNodes = gArgs.GetArgs("-addnode");
1903-
}
1904-
19051900
while (true)
19061901
{
19071902
CSemaphoreGrant grant(*semAddnode);

src/net.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class CConnman
147147
std::vector<CService> vBinds, vWhiteBinds;
148148
bool m_use_addrman_outgoing = true;
149149
std::vector<std::string> m_specified_outgoing;
150+
std::vector<std::string> m_added_nodes;
150151
};
151152

152153
void Init(const Options& connOptions) {
@@ -164,6 +165,7 @@ class CConnman
164165
nMaxOutboundTimeframe = connOptions.nMaxOutboundTimeframe;
165166
nMaxOutboundLimit = connOptions.nMaxOutboundLimit;
166167
vWhitelistedRange = connOptions.vWhitelistedRange;
168+
vAddedNodes = connOptions.m_added_nodes;
167169
}
168170

169171
CConnman(uint64_t seed0, uint64_t seed1);

0 commit comments

Comments
 (0)