Overwinter peer management and network handshaking.

Implements ZIP 201.
This commit is contained in:
Simon
2018-02-20 11:03:40 -08:00
parent 2423a40c08
commit 72b2192950
4 changed files with 61 additions and 1 deletions

View File

@@ -57,6 +57,8 @@ static const size_t MAPASKFOR_MAX_SZ = MAX_INV_SZ;
static const size_t SETASKFOR_MAX_SZ = 2 * MAX_INV_SZ;
/** The maximum number of peer connections to maintain. */
static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125;
/** The period before a network upgrade activates, where connections to upgrading peers are preferred (in blocks). */
static const int NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD = 24 * 24 * 3;
unsigned int ReceiveFloodSize();
unsigned int SendBufferSize();