aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2017-07-06 13:53:52 -0400
committerCory Fields <cory-nospam-@coryfields.com>2017-09-06 19:03:39 -0400
commit28f11e9406b185dc87144f1f29af0d93eb115b4e (patch)
tree27f8a55fc1e1ee47a682f6944b69190824c6dbcc /src/net.cpp
parentbcc8a620eae9cd8fe95f0a02f17183c4a132e5a2 (diff)
net: pass CConnman via pointer rather than reference
There are a few too many edge-cases here to make this a scripted diff. The following commits will move a few functions into PeerLogicValidation, where the local connman instance can be used. This change prepares for that usage.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 1eb867b48b..5e29e6fee4 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1114,7 +1114,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
CNode* pnode = new CNode(id, nLocalServices, GetBestHeight(), hSocket, addr, CalculateKeyedNetGroup(addr), nonce, addr_bind, "", true);
pnode->AddRef();
pnode->fWhitelisted = whitelisted;
- GetNodeSignals().InitializeNode(pnode, *this);
+ GetNodeSignals().InitializeNode(pnode, this);
LogPrint(BCLog::NET, "connection from %s accepted\n", addr.ToString());
@@ -1966,7 +1966,7 @@ bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFai
if (fAddnode)
pnode->fAddnode = true;
- GetNodeSignals().InitializeNode(pnode, *this);
+ GetNodeSignals().InitializeNode(pnode, this);
{
LOCK(cs_vNodes);
vNodes.push_back(pnode);
@@ -1996,7 +1996,7 @@ void CConnman::ThreadMessageHandler()
continue;
// Receive messages
- bool fMoreNodeWork = GetNodeSignals().ProcessMessages(pnode, *this, flagInterruptMsgProc);
+ bool fMoreNodeWork = GetNodeSignals().ProcessMessages(pnode, this, flagInterruptMsgProc);
fMoreWork |= (fMoreNodeWork && !pnode->fPauseSend);
if (flagInterruptMsgProc)
return;
@@ -2004,7 +2004,7 @@ void CConnman::ThreadMessageHandler()
// Send messages
{
LOCK(pnode->cs_sendProcessing);
- GetNodeSignals().SendMessages(pnode, *this, flagInterruptMsgProc);
+ GetNodeSignals().SendMessages(pnode, this, flagInterruptMsgProc);
}
if (flagInterruptMsgProc)
return;