Replace setInventoryKnown with a rolling bloom filter.
Github-Pull: #7133 Rebased-From:ec73ef37ece20672479e6b849350abb6a0da45dbd41e44c9acaa4b0c26b0
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
6ba25d2886
commit
f31955d9da
@@ -2342,7 +2342,7 @@ unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", DEFAULT_MAX
|
||||
CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNameIn, bool fInboundIn) :
|
||||
ssSend(SER_NETWORK, INIT_PROTO_VERSION),
|
||||
addrKnown(5000, 0.001),
|
||||
setInventoryKnown(SendBufferSize() / 1000)
|
||||
filterInventoryKnown(50000, 0.000001)
|
||||
{
|
||||
nServices = 0;
|
||||
hSocket = hSocketIn;
|
||||
@@ -2369,6 +2369,7 @@ CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNa
|
||||
nSendOffset = 0;
|
||||
hashContinue = uint256();
|
||||
nStartingHeight = -1;
|
||||
filterInventoryKnown.reset();
|
||||
fGetAddr = false;
|
||||
fRelayTxes = false;
|
||||
pfilter = new CBloomFilter();
|
||||
|
||||
Reference in New Issue
Block a user