File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1664,6 +1664,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
1664
1664
connOptions.m_msgproc = peerLogic.get ();
1665
1665
connOptions.nSendBufferMaxSize = 1000 *gArgs .GetArg (" -maxsendbuffer" , DEFAULT_MAXSENDBUFFER);
1666
1666
connOptions.nReceiveFloodSize = 1000 *gArgs .GetArg (" -maxreceivebuffer" , DEFAULT_MAXRECEIVEBUFFER);
1667
+ connOptions.m_added_nodes = gArgs .GetArgs (" -addnode" );
1667
1668
1668
1669
connOptions.nMaxOutboundTimeframe = nMaxOutboundTimeframe;
1669
1670
connOptions.nMaxOutboundLimit = nMaxOutboundLimit;
@@ -1694,9 +1695,8 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
1694
1695
connOptions.vWhitelistedRange .push_back (subnet);
1695
1696
}
1696
1697
1697
- if (gArgs .IsArgSet (" -seednode" )) {
1698
- connOptions.vSeedNodes = gArgs .GetArgs (" -seednode" );
1699
- }
1698
+ connOptions.vSeedNodes = gArgs .GetArgs (" -seednode" );
1699
+
1700
1700
// Initiate outbound connections unless connect=0
1701
1701
connOptions.m_use_addrman_outgoing = !gArgs .IsArgSet (" -connect" );
1702
1702
if (!connOptions.m_use_addrman_outgoing ) {
Original file line number Diff line number Diff line change @@ -1900,11 +1900,6 @@ std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo()
1900
1900
1901
1901
void CConnman::ThreadOpenAddedConnections ()
1902
1902
{
1903
- {
1904
- LOCK (cs_vAddedNodes);
1905
- vAddedNodes = gArgs .GetArgs (" -addnode" );
1906
- }
1907
-
1908
1903
while (true )
1909
1904
{
1910
1905
CSemaphoreGrant grant (*semAddnode);
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ class CConnman
147
147
std::vector<CService> vBinds, vWhiteBinds;
148
148
bool m_use_addrman_outgoing = true ;
149
149
std::vector<std::string> m_specified_outgoing;
150
+ std::vector<std::string> m_added_nodes;
150
151
};
151
152
152
153
void Init (const Options& connOptions) {
@@ -164,6 +165,7 @@ class CConnman
164
165
nMaxOutboundTimeframe = connOptions.nMaxOutboundTimeframe ;
165
166
nMaxOutboundLimit = connOptions.nMaxOutboundLimit ;
166
167
vWhitelistedRange = connOptions.vWhitelistedRange ;
168
+ vAddedNodes = connOptions.m_added_nodes ;
167
169
}
168
170
169
171
CConnman (uint64_t seed0, uint64_t seed1);
You can’t perform that action at this time.
0 commit comments