Skip to content

Commit 224d878

Browse files
committed
net, refactor: Drop tautological local variables
1 parent 3073a99 commit 224d878

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/net_processing.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -4164,22 +4164,18 @@ bool PeerManagerImpl::ProcessMessages(CNode* pfrom, std::atomic<bool>& interrupt
41644164
}
41654165

41664166
msg.SetVersion(pfrom->GetCommonVersion());
4167-
const std::string& msg_type = msg.m_type;
4168-
4169-
// Message size
4170-
unsigned int nMessageSize = msg.m_message_size;
41714167

41724168
try {
4173-
ProcessMessage(*pfrom, msg_type, msg.m_recv, msg.m_time, interruptMsgProc);
4169+
ProcessMessage(*pfrom, msg.m_type, msg.m_recv, msg.m_time, interruptMsgProc);
41744170
if (interruptMsgProc) return false;
41754171
{
41764172
LOCK(peer->m_getdata_requests_mutex);
41774173
if (!peer->m_getdata_requests.empty()) fMoreWork = true;
41784174
}
41794175
} catch (const std::exception& e) {
4180-
LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' (%s) caught\n", __func__, SanitizeString(msg_type), nMessageSize, e.what(), typeid(e).name());
4176+
LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' (%s) caught\n", __func__, SanitizeString(msg.m_type), msg.m_message_size, e.what(), typeid(e).name());
41814177
} catch (...) {
4182-
LogPrint(BCLog::NET, "%s(%s, %u bytes): Unknown exception caught\n", __func__, SanitizeString(msg_type), nMessageSize);
4178+
LogPrint(BCLog::NET, "%s(%s, %u bytes): Unknown exception caught\n", __func__, SanitizeString(msg.m_type), msg.m_message_size);
41834179
}
41844180

41854181
return fMoreWork;

0 commit comments

Comments
 (0)