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:
Shashwat
2022-04-07 17:13:52 +05:30
parent e3de7cb903
commit 2b09593bdd
3 changed files with 26 additions and 26 deletions

View File

@@ -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);
};
/**