diff options
author | Gregory Maxwell <greg@xiph.org> | 2015-11-26 05:25:30 +0000 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-12-04 15:01:09 +0100 |
commit | f31955d9da152e5e849575f0297f8fe1904cbfbc (patch) | |
tree | 773fb64fc9c15b0000acb9e71ae1fd1c5145f245 /src/net.cpp | |
parent | 6ba25d28868146d5d6dbd671881db3a58f549567 (diff) | |
download | bitcoin-f31955d9da152e5e849575f0297f8fe1904cbfbc.tar.xz |
Replace setInventoryKnown with a rolling bloom filter.
Github-Pull: #7133
Rebased-From: ec73ef37eccfeda76de55c4ff93ea54d4e69e1ec e20672479ef7f2048c2e27494397641d47a4d88d 6b849350ab074a7ccb80ecbef387f59e1271ded6 b6a0da45db8d534e7a77d1cebe382cd5d83ba9b8 d41e44c9accb3df84e0abbc602cc76b72754d382 aa4b0c26b0a94ca6164c441aae723e118554d214
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index e5659efc01..a8aa97feec 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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(); |