Skip to content

Commit 551a094

Browse files
committed
net: Switch to DisconnectMsg in CConnman
1 parent bbac176 commit 551a094

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/net.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,7 @@ bool CConnman::AttemptToEvictConnection()
17071707
LOCK(m_nodes_mutex);
17081708
for (CNode* pnode : m_nodes) {
17091709
if (pnode->GetId() == *node_id_to_evict) {
1710-
LogDebug(BCLog::NET, "selected %s connection for eviction peer=%d; disconnecting\n", pnode->ConnectionTypeAsString(), pnode->GetId());
1710+
LogDebug(BCLog::NET, "selected %s connection for eviction, %s", pnode->ConnectionTypeAsString(), pnode->DisconnectMsg(fLogIPs));
17111711
pnode->fDisconnect = true;
17121712
return true;
17131713
}
@@ -3608,7 +3608,7 @@ bool CConnman::DisconnectNode(const std::string& strNode)
36083608
{
36093609
LOCK(m_nodes_mutex);
36103610
if (CNode* pnode = FindNode(strNode)) {
3611-
LogDebug(BCLog::NET, "disconnect by address%s matched peer=%d; disconnecting\n", (fLogIPs ? strprintf("=%s", strNode) : ""), pnode->GetId());
3611+
LogDebug(BCLog::NET, "disconnect by address%s match, %s", (fLogIPs ? strprintf("=%s", strNode) : ""), pnode->DisconnectMsg(fLogIPs));
36123612
pnode->fDisconnect = true;
36133613
return true;
36143614
}
@@ -3621,7 +3621,7 @@ bool CConnman::DisconnectNode(const CSubNet& subnet)
36213621
LOCK(m_nodes_mutex);
36223622
for (CNode* pnode : m_nodes) {
36233623
if (subnet.Match(pnode->addr)) {
3624-
LogDebug(BCLog::NET, "disconnect by subnet%s matched peer=%d; disconnecting\n", (fLogIPs ? strprintf("=%s", subnet.ToString()) : ""), pnode->GetId());
3624+
LogDebug(BCLog::NET, "disconnect by subnet%s match, %s", (fLogIPs ? strprintf("=%s", subnet.ToString()) : ""), pnode->DisconnectMsg(fLogIPs));
36253625
pnode->fDisconnect = true;
36263626
disconnected = true;
36273627
}
@@ -3639,7 +3639,7 @@ bool CConnman::DisconnectNode(NodeId id)
36393639
LOCK(m_nodes_mutex);
36403640
for(CNode* pnode : m_nodes) {
36413641
if (id == pnode->GetId()) {
3642-
LogDebug(BCLog::NET, "disconnect by id peer=%d; disconnecting\n", pnode->GetId());
3642+
LogDebug(BCLog::NET, "disconnect by id, %s", pnode->DisconnectMsg(fLogIPs));
36433643
pnode->fDisconnect = true;
36443644
return true;
36453645
}

0 commit comments

Comments
 (0)