mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Add vConnect to CConnman::Options
Split the "-connect" argument parsing out of CConnman and put it into AppInitMain().
This commit is contained in:
parent
7b6e8bc442
commit
352d582ba2
3 changed files with 24 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue