aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-02-27 17:55:53 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2012-02-27 21:04:32 +0100
commitc4341fa6abf7510c6de72cd435f4d4146dce74c2 (patch)
tree99280bb817318cf04b6d9de6b4df82a171218168 /src/net.h
parentfbbd42a535813b2d7e30dba44c5c36b70833fe55 (diff)
Add mruset and use it for setInventoryKnown
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 51a816d4d3..d3e10f5a89 100644
--- a/src/net.h
+++ b/src/net.h
@@ -14,6 +14,7 @@
#include <arpa/inet.h>
#endif
+#include "mruset.h"
#include "netbase.h"
#include "protocol.h"
@@ -154,7 +155,7 @@ public:
std::set<uint256> setKnown;
// inventory based relay
- std::set<CInv> setInventoryKnown;
+ mruset<CInv> setInventoryKnown;
std::vector<CInv> vInventoryToSend;
CCriticalSection cs_inventory;
std::multimap<int64, CInv> mapAskFor;
@@ -193,6 +194,7 @@ public:
fGetAddr = false;
vfSubscribe.assign(256, false);
nMisbehavior = 0;
+ setInventoryKnown.max_size(SendBufferSize() / 1000);
// Be shy and don't send version until we hear
if (!fInbound)