aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-05-10 19:48:11 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-05-11 00:20:57 +0200
commit51e9393c1f6c9eaac554f821f5327f63bd09c8cf (patch)
treedf9eb5573c819652a8a337a5e87af18cda0083a2 /src/net.cpp
parent88d8b4e182bfc75e8496f7046af7aab93307b9d0 (diff)
downloadbitcoin-51e9393c1f6c9eaac554f821f5327f63bd09c8cf.tar.xz
refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg
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 97b80b50e2..3eb87b7007 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -723,7 +723,7 @@ void V1TransportSerializer::prepareForTransport(CSerializedNetMsg& msg, std::vec
uint256 hash = Hash(msg.data.begin(), msg.data.end());
// create header
- CMessageHeader hdr(Params().MessageStart(), msg.command.c_str(), msg.data.size());
+ CMessageHeader hdr(Params().MessageStart(), msg.m_type.c_str(), msg.data.size());
memcpy(hdr.pchChecksum, hash.begin(), CMessageHeader::CHECKSUM_SIZE);
// serialize header
@@ -2736,7 +2736,7 @@ bool CConnman::NodeFullyConnected(const CNode* pnode)
void CConnman::PushMessage(CNode* pnode, CSerializedNetMsg&& msg)
{
size_t nMessageSize = msg.data.size();
- LogPrint(BCLog::NET, "sending %s (%d bytes) peer=%d\n", SanitizeString(msg.command), nMessageSize, pnode->GetId());
+ LogPrint(BCLog::NET, "sending %s (%d bytes) peer=%d\n", SanitizeString(msg.m_type), nMessageSize, pnode->GetId());
// make sure we use the appropriate network transport format
std::vector<unsigned char> serializedHeader;
@@ -2748,8 +2748,8 @@ void CConnman::PushMessage(CNode* pnode, CSerializedNetMsg&& msg)
LOCK(pnode->cs_vSend);
bool optimisticSend(pnode->vSendMsg.empty());
- //log total amount of bytes per command
- pnode->mapSendBytesPerMsgCmd[msg.command] += nTotalSize;
+ //log total amount of bytes per message type
+ pnode->mapSendBytesPerMsgCmd[msg.m_type] += nTotalSize;
pnode->nSendSize += nTotalSize;
if (pnode->nSendSize > nSendBufferMaxSize)