Skip to content

Commit 6b84935

Browse files
pstratemsipa
authored andcommitted
Rename setInventoryKnown filterInventoryKnown
1 parent e206724 commit 6b84935

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5510,7 +5510,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
55105510
vInvWait.reserve(pto->vInventoryToSend.size());
55115511
BOOST_FOREACH(const CInv& inv, pto->vInventoryToSend)
55125512
{
5513-
if (pto->setInventoryKnown.contains(inv.hash))
5513+
if (pto->filterInventoryKnown.contains(inv.hash))
55145514
continue;
55155515

55165516
// trickle out tx inv to protect privacy
@@ -5531,9 +5531,9 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
55315531
}
55325532
}
55335533

5534-
if (!pto->setInventoryKnown.contains(inv.hash))
5534+
if (!pto->filterInventoryKnown.contains(inv.hash))
55355535
{
5536-
pto->setInventoryKnown.insert(inv.hash);
5536+
pto->filterInventoryKnown.insert(inv.hash);
55375537
vInv.push_back(inv);
55385538
if (vInv.size() >= 1000)
55395539
{

src/net.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,7 +2342,7 @@ unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", DEFAULT_MAX
23422342
CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNameIn, bool fInboundIn) :
23432343
ssSend(SER_NETWORK, INIT_PROTO_VERSION),
23442344
addrKnown(5000, 0.001),
2345-
setInventoryKnown(50000, 0.000001)
2345+
filterInventoryKnown(50000, 0.000001)
23462346
{
23472347
nServices = 0;
23482348
hSocket = hSocketIn;
@@ -2369,7 +2369,7 @@ CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNa
23692369
nSendOffset = 0;
23702370
hashContinue = uint256();
23712371
nStartingHeight = -1;
2372-
setInventoryKnown.reset();
2372+
filterInventoryKnown.reset();
23732373
fGetAddr = false;
23742374
fRelayTxes = false;
23752375
pfilter = new CBloomFilter();

src/net.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class CNode
385385
std::set<uint256> setKnown;
386386

387387
// inventory based relay
388-
CRollingBloomFilter setInventoryKnown;
388+
CRollingBloomFilter filterInventoryKnown;
389389
std::vector<CInv> vInventoryToSend;
390390
CCriticalSection cs_inventory;
391391
std::multimap<int64_t, CInv> mapAskFor;
@@ -493,15 +493,15 @@ class CNode
493493
{
494494
{
495495
LOCK(cs_inventory);
496-
setInventoryKnown.insert(inv.hash);
496+
filterInventoryKnown.insert(inv.hash);
497497
}
498498
}
499499

500500
void PushInventory(const CInv& inv)
501501
{
502502
{
503503
LOCK(cs_inventory);
504-
if (!setInventoryKnown.contains(inv.hash))
504+
if (!filterInventoryKnown.contains(inv.hash))
505505
vInventoryToSend.push_back(inv);
506506
}
507507
}

0 commit comments

Comments
 (0)