Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
struct bilingual_str; | struct bilingual_str; | ||||
/** Default for -whitelistrelay. */ | /** Default for -whitelistrelay. */ | ||||
static const bool DEFAULT_WHITELISTRELAY = true; | static const bool DEFAULT_WHITELISTRELAY = true; | ||||
/** Default for -whitelistforcerelay. */ | /** Default for -whitelistforcerelay. */ | ||||
static const bool DEFAULT_WHITELISTFORCERELAY = false; | static const bool DEFAULT_WHITELISTFORCERELAY = false; | ||||
/** | /** | ||||
* Time between pings automatically sent out for latency probing and keepalive | |||||
* (in seconds). | |||||
*/ | |||||
static const int PING_INTERVAL = 2 * 60; | |||||
/** | |||||
* Time after which to disconnect, after waiting for a ping response (or | * Time after which to disconnect, after waiting for a ping response (or | ||||
* inactivity). | * inactivity). | ||||
*/ | */ | ||||
static const int TIMEOUT_INTERVAL = 20 * 60; | static const int TIMEOUT_INTERVAL = 20 * 60; | ||||
/** Run the feeler connection loop once every 2 minutes or 120 seconds. **/ | /** Run the feeler connection loop once every 2 minutes or 120 seconds. **/ | ||||
static const int FEELER_INTERVAL = 120; | static const int FEELER_INTERVAL = 120; | ||||
/** The maximum number of entries in an 'inv' protocol message */ | |||||
static const unsigned int MAX_INV_SZ = 50000; | |||||
static_assert(MAX_PROTOCOL_MESSAGE_LENGTH > MAX_INV_SZ * sizeof(CInv), | |||||
"Max protocol message length must be greater than largest " | |||||
"possible INV message"); | |||||
/** The maximum number of entries in a locator */ | |||||
static const unsigned int MAX_LOCATOR_SZ = 101; | |||||
/** The maximum number of new addresses to accumulate before announcing. */ | /** The maximum number of new addresses to accumulate before announcing. */ | ||||
static const unsigned int MAX_ADDR_TO_SEND = 1000; | static const unsigned int MAX_ADDR_TO_SEND = 1000; | ||||
/** Maximum length of the user agent string in `version` message */ | /** Maximum length of the user agent string in `version` message */ | ||||
static const unsigned int MAX_SUBVERSION_LENGTH = 256; | static const unsigned int MAX_SUBVERSION_LENGTH = 256; | ||||
/** | /** | ||||
* Maximum number of automatic outgoing nodes over which we'll relay everything | * Maximum number of automatic outgoing nodes over which we'll relay everything | ||||
* (blocks, tx, addrs, etc) | * (blocks, tx, addrs, etc) | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,104 Lines • Show Last 20 Lines |