mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Remove fNetworkNode.
Matt pointed out to me that this appeared to be doing nothing (except involving itself in data races).
This commit is contained in:
parent
76fec09d87
commit
083f203698
@ -5242,8 +5242,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
{
|
||||
pfrom->SetRecvVersion(min(pfrom->nVersion, PROTOCOL_VERSION));
|
||||
|
||||
// Mark this node as currently connected, so we update its timestamp later.
|
||||
if (pfrom->fNetworkNode) {
|
||||
if (!pfrom->fInbound) {
|
||||
// Mark this node as currently connected, so we update its timestamp later.
|
||||
LOCK(cs_main);
|
||||
State(pfrom->GetId())->fCurrentlyConnected = true;
|
||||
}
|
||||
|
@ -1067,8 +1067,7 @@ void CConnman::ThreadSocketHandler()
|
||||
pnode->CloseSocketDisconnect();
|
||||
|
||||
// hold in disconnected pool until all refs are released
|
||||
if (pnode->fNetworkNode || pnode->fInbound)
|
||||
pnode->Release();
|
||||
pnode->Release();
|
||||
vNodesDisconnected.push_back(pnode);
|
||||
}
|
||||
}
|
||||
@ -1808,7 +1807,6 @@ bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFai
|
||||
return false;
|
||||
if (grantOutbound)
|
||||
grantOutbound->MoveTo(pnode->grantOutbound);
|
||||
pnode->fNetworkNode = true;
|
||||
if (fOneShot)
|
||||
pnode->fOneShot = true;
|
||||
if (fFeeler)
|
||||
@ -2531,7 +2529,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
|
||||
fOneShot = false;
|
||||
fClient = false; // set by version message
|
||||
fFeeler = false;
|
||||
fNetworkNode = false;
|
||||
fSuccessfullyConnected = false;
|
||||
fDisconnect = false;
|
||||
nRefCount = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user