diff options
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -9,7 +9,6 @@ #include "bloom.h" #include "compat.h" #include "limitedmap.h" -#include "mruset.h" #include "netbase.h" #include "protocol.h" #include "random.h" @@ -388,7 +387,7 @@ public: std::set<uint256> setKnown; // inventory based relay - mruset<CInv> setInventoryKnown; + CRollingBloomFilter filterInventoryKnown; std::vector<CInv> vInventoryToSend; CCriticalSection cs_inventory; std::set<uint256> setAskFor; @@ -497,7 +496,7 @@ public: { { LOCK(cs_inventory); - setInventoryKnown.insert(inv); + filterInventoryKnown.insert(inv.hash); } } @@ -505,8 +504,9 @@ public: { { LOCK(cs_inventory); - if (!setInventoryKnown.count(inv)) - vInventoryToSend.push_back(inv); + if (inv.type == MSG_TX && filterInventoryKnown.contains(inv.hash)) + return; + vInventoryToSend.push_back(inv); } } |