-BEGIN VERIFY SCRIPT- SED=$(which gsed) export SED echo $SED export SRC=src function s { git grep -l "$1" $SRC | xargs $SED -i "s/$1/$2/g"; } function doit1 { s 'COMMAND_SIZE' 'MESSAGE_SIZE' s 'command name' 'message name' s 'pchCommand' 'pchMessage' s 'pszCommand' 'pszMessage' } function doit2 { s 'GetCommand' 'GetMessage' } export SRC=src && doit1 export SRC=src/net.h && doit1 export SRC=src/net.cpp && doit1 export SRC=src/protocol.h && doit1 export SRC=src/protocol.cpp && doit1 export SRC=src/test/fuzz/protocol.cpp && doit1 export SRC=src/test/fuzz/protocol.cpp && doit2 export SRC=src/test/fuzz/process_messages.cpp && doit1 export SRC=src/test/fuzz/process_messages.cpp && doit2 -END VERIFY SCRIPT-
WIP: net/p2p:rename command*/Command/* to message*/Message* #24143
pull RandyMcMillan wants to merge 1 commits into bitcoin:master from RandyMcMillan:1643068742-rename-COMMAND_SIZE-to-MESSAGE_SIZE changing 9 files +33 −33-
RandyMcMillan commented at 12:48 AM on January 25, 2022: contributor
-
RandyMcMillan commented at 12:51 AM on January 25, 2022: contributor
After reviewing PR #24141 It seems appropriate to rename COMMAND_SIZE to MESSAGE_SIZE
MESSAGE_SIZE better suggests the usage and scope of this variable.
- RandyMcMillan renamed this:
net/p2p:rename COMMAND_SIZE to MESSAGE_SIZE
WIP: net/p2p:rename COMMAND_SIZE to MESSAGE_SIZE
on Jan 25, 2022 - RandyMcMillan marked this as a draft on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan marked this as ready for review on Jan 25, 2022
- DrahtBot added the label P2P on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan marked this as a draft on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan marked this as ready for review on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan renamed this:
WIP: net/p2p:rename COMMAND_SIZE to MESSAGE_SIZE
WIP: net/p2p:rename command*/Command/* to message*/Message*
on Jan 25, 2022 - RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan marked this as a draft on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
- RandyMcMillan force-pushed on Jan 25, 2022
-
34a1d3b0cb
scripted-diff: net/p2p: rename command* Command* to message* Message*
-BEGIN VERIFY SCRIPT- test gsed && SED=$(which gsed) && export SED || SED=$(which sed) export SRC=src function s { git grep -l "$1" $SRC | xargs $SED -i "s/$1/$2/g"; } function doit1 { s 'COMMAND_SIZE' 'MESSAGE_SIZE' s 'command name' 'message name' s 'pchCommand' 'pchMessage' s 'pszCommand' 'pszMessage' s 'IsCommandValid' 'IsMessageValid' } function doit2 { s 'GetCommand' 'GetMessage' } export SRC=src && doit1 export SRC=src/net.h && doit1 export SRC=src/net.cpp && doit1 export SRC=src/protocol.h && doit1 export SRC=src/protocol.cpp && doit1 export SRC=src/test/fuzz/protocol.cpp && doit1 export SRC=src/test/fuzz/protocol.cpp && doit2 export SRC=src/test/fuzz/process_messages.cpp && doit1 export SRC=src/test/fuzz/process_messages.cpp && doit2 -END VERIFY SCRIPT- - RandyMcMillan force-pushed on Jan 25, 2022
-
DrahtBot commented at 12:40 AM on January 26, 2022: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #23438 (refactor: Use spans of std::byte in serialize by MarcoFalke)
- #23233 (BIP324: Add encrypted p2p transport {de}serializer by dhruv)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
laanwj commented at 4:28 PM on January 27, 2022: member
I do think "Message" is a better fit than "Command" conceptually. A P2P network doesn't have commands. ~0 on renaming it all over the place, though. Also, maybe something like "MessageType" would be a better name when you're renaming anyway. It'd be clearer that it refers to a field defining what kind of message it is instead of the entire message.
- DrahtBot added the label Needs rebase on Jan 27, 2022
-
DrahtBot commented at 8:07 PM on January 27, 2022: member
<!--cf906140f33d8803c4a75a2196329ecb-->
🐙 This pull request conflicts with the target branch and needs rebase.
<sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>
- RandyMcMillan closed this on Mar 19, 2022
- DrahtBot locked this on Mar 19, 2023