diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-01-15 21:03:00 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-01-15 21:03:00 +0200 |
commit | 224d87855ec38cc15866d9673e1b19942a82c1cd (patch) | |
tree | 9ee30e56024c7ddbbb1dcb5e59597d6a33d2405c /src/net_processing.cpp | |
parent | 3073a9917b31d15ba958ea8148585633ba905f8b (diff) |
net, refactor: Drop tautological local variables
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 93cb1281d4..de48ebc475 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4164,22 +4164,18 @@ bool PeerManagerImpl::ProcessMessages(CNode* pfrom, std::atomic<bool>& interrupt } msg.SetVersion(pfrom->GetCommonVersion()); - const std::string& msg_type = msg.m_type; - - // Message size - unsigned int nMessageSize = msg.m_message_size; try { - ProcessMessage(*pfrom, msg_type, msg.m_recv, msg.m_time, interruptMsgProc); + ProcessMessage(*pfrom, msg.m_type, msg.m_recv, msg.m_time, interruptMsgProc); if (interruptMsgProc) return false; { LOCK(peer->m_getdata_requests_mutex); if (!peer->m_getdata_requests.empty()) fMoreWork = true; } } catch (const std::exception& e) { - LogPrint(BCLog::NET, "%s(%s, %u bytes): Exception '%s' (%s) caught\n", __func__, SanitizeString(msg_type), nMessageSize, e.what(), typeid(e).name()); + 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()); } catch (...) { - LogPrint(BCLog::NET, "%s(%s, %u bytes): Unknown exception caught\n", __func__, SanitizeString(msg_type), nMessageSize); + LogPrint(BCLog::NET, "%s(%s, %u bytes): Unknown exception caught\n", __func__, SanitizeString(msg.m_type), msg.m_message_size); } return fMoreWork; |