mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 11:12:50 +01:00
scripted-diff: Rename message command to message type
-BEGIN VERIFY SCRIPT-
s1() { sed -i "s/$1/$2/g" $(git grep -l "$1" ./); }
s1 'NET_MESSAGE_COMMAND_OTHER' 'NET_MESSAGE_TYPE_OTHER'
s1 'mapMsgCmdSize' 'mapMsgTypeSize'
s1 'mapRecvBytesPerMsgCmd' 'mapRecvBytesPerMsgType'
s1 'mapSendBytesPerMsgCmd' 'mapSendBytesPerMsgType'
s1 'recvPerMsgCmd' 'recvPerMsgType'
s1 'sendPerMsgCmd' 'sendPerMsgType'
-END VERIFY SCRIPT-
This commit is contained in:
12
src/net.h
12
src/net.h
@@ -233,8 +233,8 @@ struct LocalServiceInfo {
|
||||
extern Mutex g_maplocalhost_mutex;
|
||||
extern std::map<CNetAddr, LocalServiceInfo> mapLocalHost GUARDED_BY(g_maplocalhost_mutex);
|
||||
|
||||
extern const std::string NET_MESSAGE_COMMAND_OTHER;
|
||||
typedef std::map<std::string, uint64_t> mapMsgCmdSize; //command, total bytes
|
||||
extern const std::string NET_MESSAGE_TYPE_OTHER;
|
||||
typedef std::map<std::string, uint64_t> mapMsgTypeSize; //command, total bytes
|
||||
|
||||
class CNodeStats
|
||||
{
|
||||
@@ -256,9 +256,9 @@ public:
|
||||
bool m_bip152_highbandwidth_from;
|
||||
int m_starting_height;
|
||||
uint64_t nSendBytes;
|
||||
mapMsgCmdSize mapSendBytesPerMsgCmd;
|
||||
mapMsgTypeSize mapSendBytesPerMsgType;
|
||||
uint64_t nRecvBytes;
|
||||
mapMsgCmdSize mapRecvBytesPerMsgCmd;
|
||||
mapMsgTypeSize mapRecvBytesPerMsgType;
|
||||
NetPermissionFlags m_permissionFlags;
|
||||
std::chrono::microseconds m_last_ping_time;
|
||||
std::chrono::microseconds m_min_ping_time;
|
||||
@@ -696,8 +696,8 @@ private:
|
||||
CService addrLocal GUARDED_BY(m_addr_local_mutex);
|
||||
mutable Mutex m_addr_local_mutex;
|
||||
|
||||
mapMsgCmdSize mapSendBytesPerMsgCmd GUARDED_BY(cs_vSend);
|
||||
mapMsgCmdSize mapRecvBytesPerMsgCmd GUARDED_BY(cs_vRecv);
|
||||
mapMsgTypeSize mapSendBytesPerMsgType GUARDED_BY(cs_vSend);
|
||||
mapMsgTypeSize mapRecvBytesPerMsgType GUARDED_BY(cs_vRecv);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user