diff options
author | Josh Lehan <krellan@krellan.net> | 2014-11-16 03:19:23 -0800 |
---|---|---|
committer | Josh Lehan <krellan@krellan.net> | 2015-06-14 02:07:15 -0700 |
commit | e3cae525382520ddbef92bf86f43eaf0521f4325 (patch) | |
tree | 15309359eda1a6cfed1a50ef74c45eaa17a04c09 /src/net.h | |
parent | ab0ec6790355473e96176ec3c2c2b1564ddb296d (diff) |
Added -whiteconnections=<n> option
This sets aside a number of connection slots for whitelisted peers,
useful for ensuring your local users and miners can always get in,
even if your limit on inbound connections has already been reached.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -140,7 +140,20 @@ extern bool fListen; extern uint64_t nLocalServices; extern uint64_t nLocalHostNonce; extern CAddrMan addrman; + +// The allocation of connections against the maximum allowed (nMaxConnections) +// is prioritized as follows: +// 1st: Outbound connections (MAX_OUTBOUND_CONNECTIONS) +// 2nd: Inbound connections from whitelisted peers (nWhiteConnections) +// 3rd: Inbound connections from non-whitelisted peers +// Thus, the number of connection slots for the general public to use is: +// nMaxConnections - (MAX_OUTBOUND_CONNECTIONS + nWhiteConnections) +// Any additional inbound connections beyond limits will be immediately closed + +/** Maximum number of connections to simultaneously allow (aka connection slots) */ extern int nMaxConnections; +/** Number of connection slots to reserve for inbound from whitelisted peers */ +extern int nWhiteConnections; extern std::vector<CNode*> vNodes; extern CCriticalSection cs_vNodes; |