Skip to content

Commit f67f12d

Browse files
authored
Merge pull request #2190 from jamescowens/fix_addnode
rpc, util: Remove use of ArgsManager::NETWORK_ONLY for now
2 parents 175f734 + 54746da commit f67f12d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/init.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -467,15 +467,15 @@ void SetupServerArgs()
467467
argsman.AddArg("-dns", "Allow DNS lookups for -addnode, -seednode and -connect",
468468
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
469469
argsman.AddArg("-port=<port>", "Listen for connections on <port> (default: 32749 or testnet: 32748)",
470-
ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
470+
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
471471
argsman.AddArg("-maxconnections=<n>", "Maintain at most <n> connections to peers (default: 125)",
472472
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
473473
argsman.AddArg("-maxoutboundconnections=<n>", "Maximum number of outbound connections (default: 8)",
474474
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
475475
argsman.AddArg("-addnode=<ip>", "Add a node to connect to and attempt to keep the connection open",
476-
ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
476+
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
477477
argsman.AddArg("-connect=<ip>", "Connect only to the specified node(s)",
478-
ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
478+
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
479479
argsman.AddArg("-seednode=<ip>", "Connect to a node to retrieve peer addresses, and disconnect",
480480
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
481481
argsman.AddArg("-externalip=<ip>", "Specify your own public address",
@@ -487,7 +487,7 @@ void SetupServerArgs()
487487
argsman.AddArg("-listen", "Accept connections from outside (default: 1 if no -proxy or -connect)",
488488
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
489489
argsman.AddArg("-bind=<addr>[:<port>][=onion]", "Bind to given address. Use [host]:port notation for IPv6",
490-
ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
490+
ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
491491
argsman.AddArg("-dnsseed", "Find peers using DNS lookup (default: 1)",
492492
ArgsManager::ALLOW_BOOL, OptionsCategory::CONNECTION);
493493
argsman.AddArg("-banscore=<n>", "Threshold for disconnecting misbehaving peers (default: 100)",

src/net.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1641,6 +1641,8 @@ void ThreadOpenAddedConnections2(void* parg)
16411641
vector<vector<CService> > vservAddressesToAdd(0);
16421642
for (auto const& strAddNode : gArgs.GetArgs("-addnode"))
16431643
{
1644+
LogPrint(BCLog::LogFlags::NET, "INFO: %s: addnode %s.", __func__, strAddNode);
1645+
16441646
vector<CService> vservNode(0);
16451647
if(Lookup(strAddNode.c_str(), vservNode, GetDefaultPort(), fNameLookup, 0))
16461648
{

src/util/system.h

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ class ArgsManager
115115
* Setting them as NETWORK_ONLY ensures that sharing a config file
116116
* between mainnet and regtest/testnet won't cause problems due to these
117117
* parameters by accident. */
118+
// For Gridcoin we really can't use this flag yet, as we are still using separate
119+
// config files for mainnet and testnet.
118120
NETWORK_ONLY = 0x200,
119121
// This argument's value is sensitive (such as a password).
120122
SENSITIVE = 0x400,

0 commit comments

Comments
 (0)