|
|
@ -19,6 +19,7 @@ |
|
|
|
#include "protocol.h" |
|
|
|
#include "protocol.h" |
|
|
|
#include "addrman.h" |
|
|
|
#include "addrman.h" |
|
|
|
#include "hash.h" |
|
|
|
#include "hash.h" |
|
|
|
|
|
|
|
#include "bloom.h" |
|
|
|
|
|
|
|
|
|
|
|
class CNode; |
|
|
|
class CNode; |
|
|
|
class CBlockIndex; |
|
|
|
class CBlockIndex; |
|
|
@ -152,6 +153,8 @@ public: |
|
|
|
bool fSuccessfullyConnected; |
|
|
|
bool fSuccessfullyConnected; |
|
|
|
bool fDisconnect; |
|
|
|
bool fDisconnect; |
|
|
|
CSemaphoreGrant grantOutbound; |
|
|
|
CSemaphoreGrant grantOutbound; |
|
|
|
|
|
|
|
CCriticalSection cs_filter; |
|
|
|
|
|
|
|
CBloomFilter* pfilter; |
|
|
|
protected: |
|
|
|
protected: |
|
|
|
int nRefCount; |
|
|
|
int nRefCount; |
|
|
|
|
|
|
|
|
|
|
@ -209,6 +212,7 @@ public: |
|
|
|
fGetAddr = false; |
|
|
|
fGetAddr = false; |
|
|
|
nMisbehavior = 0; |
|
|
|
nMisbehavior = 0; |
|
|
|
setInventoryKnown.max_size(SendBufferSize() / 1000); |
|
|
|
setInventoryKnown.max_size(SendBufferSize() / 1000); |
|
|
|
|
|
|
|
pfilter = NULL; |
|
|
|
|
|
|
|
|
|
|
|
// Be shy and don't send version until we hear
|
|
|
|
// Be shy and don't send version until we hear
|
|
|
|
if (!fInbound) |
|
|
|
if (!fInbound) |
|
|
@ -222,6 +226,8 @@ public: |
|
|
|
closesocket(hSocket); |
|
|
|
closesocket(hSocket); |
|
|
|
hSocket = INVALID_SOCKET; |
|
|
|
hSocket = INVALID_SOCKET; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (pfilter) |
|
|
|
|
|
|
|
delete pfilter; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|