Skip to content

Commit 01273db

Browse files
pstratemFuzzbawls
authored andcommitted
Rename setInventoryKnown filterInventoryKnown
1 parent 4f11eb2 commit 01273db

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
@@ -6397,7 +6397,7 @@ bool SendMessages(CNode* pto)
63976397
vInv.reserve(pto->vInventoryToSend.size());
63986398
vInvWait.reserve(pto->vInventoryToSend.size());
63996399
for (const CInv& inv : pto->vInventoryToSend) {
6400-
if (pto->setInventoryKnown.contains(inv.hash))
6400+
if (pto->filterInventoryKnown.contains(inv.hash))
64016401
continue;
64026402

64036403
// trickle out tx inv to protect privacy
@@ -6416,8 +6416,8 @@ bool SendMessages(CNode* pto)
64166416
}
64176417
}
64186418

6419-
if (!pto->setInventoryKnown.contains(inv.hash)) {
6420-
pto->setInventoryKnown.insert(inv.hash);
6419+
if (!pto->filterInventoryKnown.contains(inv.hash)) {
6420+
pto->filterInventoryKnown.insert(inv.hash);
64216421
vInv.push_back(inv);
64226422
if (vInv.size() >= 1000) {
64236423
pto->PushMessage(NetMsgType::INV, vInv);

src/net.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,7 +2319,7 @@ unsigned int SendBufferSize() { return 1000 * GetArg("-maxsendbuffer", 1 * 1000)
23192319
CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fInboundIn) :
23202320
ssSend(SER_NETWORK, INIT_PROTO_VERSION),
23212321
addrKnown(5000, 0.001),
2322-
setInventoryKnown(50000, 0.000001)
2322+
filterInventoryKnown(50000, 0.000001)
23232323
{
23242324
nServices = NODE_NONE;
23252325
nServicesExpected = NODE_NONE;
@@ -2347,7 +2347,7 @@ CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fIn
23472347
nSendOffset = 0;
23482348
hashContinue = UINT256_ZERO;
23492349
nStartingHeight = -1;
2350-
setInventoryKnown.reset();
2350+
filterInventoryKnown.reset();
23512351
fGetAddr = false;
23522352
nNextLocalAddrSend = 0;
23532353
nNextAddrSend = 0;

src/net.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ class CNode
386386
int64_t nNextLocalAddrSend;
387387

388388
// inventory based relay
389-
CRollingBloomFilter setInventoryKnown;
389+
CRollingBloomFilter filterInventoryKnown;
390390
std::vector<CInv> vInventoryToSend;
391391
RecursiveMutex cs_inventory;
392392
std::multimap<int64_t, CInv> mapAskFor;
@@ -486,15 +486,15 @@ class CNode
486486
{
487487
{
488488
LOCK(cs_inventory);
489-
setInventoryKnown.insert(inv.hash);
489+
filterInventoryKnown.insert(inv.hash);
490490
}
491491
}
492492

493493
void PushInventory(const CInv& inv)
494494
{
495495
{
496496
LOCK(cs_inventory);
497-
if (!setInventoryKnown.contains(inv.hash))
497+
if (!filterInventoryKnown.contains(inv.hash))
498498
vInventoryToSend.push_back(inv);
499499
}
500500
}

0 commit comments

Comments
 (0)