diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2011-06-30 23:29:44 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2011-07-01 09:39:44 +0200 |
commit | 497317453422611a077f7f195eb193d3bb597a9c (patch) | |
tree | 3063ec6de27084fd37a62d72bdefb8eee28558c7 /src/net.h | |
parent | 44d16327c19f033169171678e58bd779301e87d5 (diff) |
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.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |