diff options
| author | Pieter Wuille <[email protected]> | 2015-04-25 08:19:57 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2015-04-30 08:16:30 -0700 |
| commit | d4d5022cfc6f1b826e4c644539a2c756a7499198 (patch) | |
| tree | 0695cf6b9460dba508e2212153140e73f2689bbd /src/net.cpp | |
| parent | Replace mruset setAddrKnown with CRollingBloomFilter addrKnown (diff) | |
| download | discoin-d4d5022cfc6f1b826e4c644539a2c756a7499198.tar.xz discoin-d4d5022cfc6f1b826e4c644539a2c756a7499198.zip | |
Use ring buffer of set iterators instead of deque of copies in mruset
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index 4648dae11..2de04fc57 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1905,7 +1905,10 @@ bool CAddrDB::Read(CAddrMan& addr) unsigned int ReceiveFloodSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); } unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); } -CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fInboundIn) : ssSend(SER_NETWORK, INIT_PROTO_VERSION), addrKnown(5000, 0.001, insecure_rand()) +CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fInboundIn) : + ssSend(SER_NETWORK, INIT_PROTO_VERSION), + addrKnown(5000, 0.001, insecure_rand()), + setInventoryKnown(SendBufferSize() / 1000) { nServices = 0; hSocket = hSocketIn; @@ -1934,7 +1937,6 @@ CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fIn nStartingHeight = -1; fGetAddr = false; fRelayTxes = false; - setInventoryKnown.max_size(SendBufferSize() / 1000); pfilter = new CBloomFilter(); nPingNonceSent = 0; nPingUsecStart = 0; |