mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Limit response to getblocks to half of output buffer size
Introduce SendBufferSize() and ReceiveBufferSize(), and limit the blocks sent as response to the "getblocks" message to half of the active send buffer size.
This commit is contained in:
@@ -23,6 +23,8 @@ extern int nConnectTimeout;
|
||||
|
||||
|
||||
|
||||
inline unsigned int ReceiveBufferSize() { return 1000*GetArg("-maxreceivebuffer", 10*1000); }
|
||||
inline unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 10*1000); }
|
||||
inline unsigned short GetDefaultPort() { return fTestNet ? 18333 : 8333; }
|
||||
static const unsigned int PUBLISH_HOPS = 5;
|
||||
enum
|
||||
|
||||
Reference in New Issue
Block a user