Skip to content

Commit

Permalink
add m_added_nodes to connman options
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Bencun authored and furszy committed Nov 22, 2021
1 parent 8c8ad18 commit 729c63d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1926,6 +1926,7 @@ bool AppInitMain()
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");

if (gArgs.IsArgSet("-bind")) {
for (const std::string& strBind : gArgs.GetArgs("-bind")) {
Expand Down
5 changes: 0 additions & 5 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1694,11 +1694,6 @@ std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo()

void CConnman::ThreadOpenAddedConnections()
{
{
LOCK(cs_vAddedNodes);
vAddedNodes = gArgs.GetArgs("-addnode");
}

while (true) {
CSemaphoreGrant grant(*semAddnode);
std::vector<AddedNodeInfo> vInfo = GetAddedNodeInfo();
Expand Down
2 changes: 2 additions & 0 deletions src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class CConnman
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) {
Expand All @@ -161,6 +162,7 @@ class CConnman
nSendBufferMaxSize = connOptions.nSendBufferMaxSize;
nReceiveFloodSize = connOptions.nReceiveFloodSize;
vWhitelistedRange = connOptions.vWhitelistedRange;
vAddedNodes = connOptions.m_added_nodes;
}

CConnman(uint64_t seed0, uint64_t seed1);
Expand Down

0 comments on commit 729c63d

Please sign in to comment.