|
|
@ -2512,9 +2512,13 @@ unsigned int CConnman::GetSendBufferSize() const{ return nSendBufferMaxSize; }
|
|
|
|
CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, const std::string& addrNameIn, bool fInboundIn) :
|
|
|
|
CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, const std::string& addrNameIn, bool fInboundIn) :
|
|
|
|
ssSend(SER_NETWORK, INIT_PROTO_VERSION),
|
|
|
|
ssSend(SER_NETWORK, INIT_PROTO_VERSION),
|
|
|
|
addr(addrIn),
|
|
|
|
addr(addrIn),
|
|
|
|
|
|
|
|
fInbound(fInboundIn),
|
|
|
|
|
|
|
|
id(idIn),
|
|
|
|
nKeyedNetGroup(nKeyedNetGroupIn),
|
|
|
|
nKeyedNetGroup(nKeyedNetGroupIn),
|
|
|
|
addrKnown(5000, 0.001),
|
|
|
|
addrKnown(5000, 0.001),
|
|
|
|
filterInventoryKnown(50000, 0.000001)
|
|
|
|
filterInventoryKnown(50000, 0.000001),
|
|
|
|
|
|
|
|
nLocalServices(nLocalServicesIn),
|
|
|
|
|
|
|
|
nMyStartingHeight(nMyStartingHeightIn)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nServices = NODE_NONE;
|
|
|
|
nServices = NODE_NONE;
|
|
|
|
nServicesExpected = NODE_NONE;
|
|
|
|
nServicesExpected = NODE_NONE;
|
|
|
@ -2533,7 +2537,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
|
|
|
|
fOneShot = false;
|
|
|
|
fOneShot = false;
|
|
|
|
fClient = false; // set by version message
|
|
|
|
fClient = false; // set by version message
|
|
|
|
fFeeler = false;
|
|
|
|
fFeeler = false;
|
|
|
|
fInbound = fInboundIn;
|
|
|
|
|
|
|
|
fNetworkNode = false;
|
|
|
|
fNetworkNode = false;
|
|
|
|
fSuccessfullyConnected = false;
|
|
|
|
fSuccessfullyConnected = false;
|
|
|
|
fDisconnect = false;
|
|
|
|
fDisconnect = false;
|
|
|
@ -2562,12 +2565,8 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
|
|
|
|
minFeeFilter = 0;
|
|
|
|
minFeeFilter = 0;
|
|
|
|
lastSentFeeFilter = 0;
|
|
|
|
lastSentFeeFilter = 0;
|
|
|
|
nextSendTimeFeeFilter = 0;
|
|
|
|
nextSendTimeFeeFilter = 0;
|
|
|
|
id = idIn;
|
|
|
|
|
|
|
|
nOptimisticBytesWritten = 0;
|
|
|
|
nOptimisticBytesWritten = 0;
|
|
|
|
nLocalServices = nLocalServicesIn;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetRandBytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
|
|
|
|
GetRandBytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
|
|
|
|
nMyStartingHeight = nMyStartingHeightIn;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOST_FOREACH(const std::string &msg, getAllNetMessageTypes())
|
|
|
|
BOOST_FOREACH(const std::string &msg, getAllNetMessageTypes())
|
|
|
|
mapRecvBytesPerMsgCmd[msg] = 0;
|
|
|
|
mapRecvBytesPerMsgCmd[msg] = 0;
|
|
|
|