diff options
| author | Cory Fields <[email protected]> | 2016-05-26 23:53:08 -0400 |
|---|---|---|
| committer | Cory Fields <[email protected]> | 2016-09-08 13:04:29 -0400 |
| commit | a19553b992f40b9f98e6e0be4cd529a89746ef50 (patch) | |
| tree | 7d8bdf280d59714df83e438324867ff374d15bb6 /src/init.cpp | |
| parent | net: Drop StartNode/StopNode and use CConnman directly (diff) | |
| download | discoin-a19553b992f40b9f98e6e0be4cd529a89746ef50.tar.xz discoin-a19553b992f40b9f98e6e0be4cd529a89746ef50.zip | |
net: Introduce CConnection::Options to avoid passing so many params
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 4e1c8e1b6..e10803643 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1515,8 +1515,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) MapPort(GetBoolArg("-upnp", DEFAULT_UPNP)); std::string strNodeError; - int nMaxOutbound = std::min(MAX_OUTBOUND_CONNECTIONS, nMaxConnections); - if(!connman.Start(threadGroup, scheduler, nLocalServices, nRelevantServices, nMaxConnections, nMaxOutbound, chainActive.Height(), &uiInterface, strNodeError)) + CConnman::Options connOptions; + connOptions.nLocalServices = nLocalServices; + connOptions.nRelevantServices = nRelevantServices; + connOptions.nMaxConnections = nMaxConnections; + connOptions.nMaxOutbound = std::min(MAX_OUTBOUND_CONNECTIONS, connOptions.nMaxConnections); + connOptions.nBestHeight = chainActive.Height(); + connOptions.uiInterface = &uiInterface; + + if(!connman.Start(threadGroup, scheduler, strNodeError, connOptions)) return InitError(strNodeError); // ********************************************************* Step 12: finished |