mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-18 08:32:30 +01:00
Add vConnect to CConnman::Options
Split the "-connect" argument parsing out of CConnman and put it into AppInitMain().
This commit is contained in:
@@ -1651,7 +1651,14 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
if (gArgs.IsArgSet("-seednode")) {
|
||||
connOptions.vSeedNodes = gArgs.GetArgs("-seednode");
|
||||
}
|
||||
|
||||
// Initiate outbound connections unless connect=0
|
||||
connOptions.m_use_addrman_outgoing = !gArgs.IsArgSet("-connect");
|
||||
if (!connOptions.m_use_addrman_outgoing) {
|
||||
const auto connect = gArgs.GetArgs("-connect");
|
||||
if (connect.size() != 1 || connect[0] != "0") {
|
||||
connOptions.m_specified_outgoing = connect;
|
||||
}
|
||||
}
|
||||
if (!connman.Start(scheduler, connOptions)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user