aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-05-26 23:53:08 -0400
committerCory Fields <cory-nospam-@coryfields.com>2016-09-08 13:04:29 -0400
commita19553b992f40b9f98e6e0be4cd529a89746ef50 (patch)
tree7d8bdf280d59714df83e438324867ff374d15bb6 /src/net.h
parentbafa5fc5a1ba33337b5eb3d8ae24ba2fac2949f8 (diff)
downloadbitcoin-a19553b992f40b9f98e6e0be4cd529a89746ef50.tar.xz
net: Introduce CConnection::Options to avoid passing so many params
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index e08409e81e..8067ee68a7 100644
--- a/src/net.h
+++ b/src/net.h
@@ -109,9 +109,18 @@ public:
CONNECTIONS_ALL = (CONNECTIONS_IN | CONNECTIONS_OUT),
};
+ struct Options
+ {
+ ServiceFlags nLocalServices = NODE_NONE;
+ ServiceFlags nRelevantServices = NODE_NONE;
+ int nMaxConnections = 0;
+ int nMaxOutbound = 0;
+ int nBestHeight = 0;
+ CClientUIInterface* uiInterface = nullptr;
+ };
CConnman();
~CConnman();
- bool Start(boost::thread_group& threadGroup, CScheduler& scheduler, ServiceFlags nLocalServicesIn, ServiceFlags nRelevantServicesIn, int nMaxConnectionsIn, int nMaxOutboundIn, int nBestHeightIn, CClientUIInterface* interfaceIn, std::string& strNodeError);
+ bool Start(boost::thread_group& threadGroup, CScheduler& scheduler, std::string& strNodeError, Options options);
void Stop();
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false);
bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false);