-
Notifications
You must be signed in to change notification settings - Fork 37.8k
scripted-diff: test: replace command with msgtype (naming) #18610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripted-diff: test: replace command with msgtype (naming) #18610
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
48731af
to
6f03d78
Compare
Concept ACK: consistent naming is better than inconsistent naming. |
Concept ACK. Makes sense that tests use the same naming as Bitcoin Core. See |
This is the functional test framework pendant for 7777e36, which renamed "strCommand" with "msg_type" in the network processing code. -BEGIN VERIFY SCRIPT- # Rename in test framework sed -i 's/command/msgtype/g' ./test/functional/test_framework/messages.py ./test/functional/test_framework/mininode.py # Rename in individual tests sed -i 's/command/msgtype/g' ./test/functional/p2p_invalid_messages.py ./test/functional/p2p_leak.py -END VERIFY SCRIPT-
6f03d78
to
9df32e8
Compare
Rebased. |
ACK 9df32e8 . Makes sense that tests use the same naming as Bitcoin Core. See |
…e (naming) 9df32e8 scripted-diff: test: replace command with msgtype (Sebastian Falbesoner) Pull request description: This is a follow-up PR to bitcoin#18533, which changed the naming of `strCommand` to `msg_type` in the network processing code. The same approach is done here for the function test framework, to get rid of the wrong "command" terminology for network mesage types. (Commands are usually used in the CLI or RPC context, so using the same name in the network message context would only be confusing.) The commit was created through the following steps: 1. search for all occurences of the string "command" within the folder `test/functional` ```git grep -i command test/functional > command_finds``` 2. manually sort out all false-positives, i.e. occurences of "command" which describe commands in the correct sense (mostly CLI or RPC related, also some with Socks5) 3. put the remaining occurences into a scripted-diff (a quite simple one, actually) that renames "command" to "msgtype" in the concerned files. The name `msgtype` was intentionally chosen without the underscore `_` as classes beginning with `msg_` define concrete types of messages. ACKs for top commit: MarcoFalke: ACK 9df32e8 . Makes sense that tests use the same naming as Bitcoin Core. See `NetMsgType` here: https://doxygen.bitcoincore.org/namespace_net_msg_type.html Tree-SHA512: cd0ee08a382910b7f10ce583acdaf4f8a39f9ba4a22434a914415727eedd98bac538de9bf6633574d5eb86f62558bc8dcb638a3289d99b04f8481f34e7a9a0c7
…alizedNetMsg 51e9393 refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg (Sebastian Falbesoner) Pull request description: Follow-up PR for #18533 -- another small step towards getting rid of the confusing "command" terminology. Also see PR #18610 which tackled the functional tests. ACKs for top commit: MarcoFalke: ACK 51e9393 Tree-SHA512: bb6f05a7be6823d5c4eab1d05b31fee944e700946827ad9425d59a3957fd879776c88c606319cbe9832d9451b275baedf913b71429ea3e01e4e82bf2d419e819
…d CSerializedNetMsg 51e9393 refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg (Sebastian Falbesoner) Pull request description: Follow-up PR for bitcoin#18533 -- another small step towards getting rid of the confusing "command" terminology. Also see PR bitcoin#18610 which tackled the functional tests. ACKs for top commit: MarcoFalke: ACK 51e9393 Tree-SHA512: bb6f05a7be6823d5c4eab1d05b31fee944e700946827ad9425d59a3957fd879776c88c606319cbe9832d9451b275baedf913b71429ea3e01e4e82bf2d419e819
Summary: ``` This is the functional test framework pendant for 7777e3624fabe4718675b2be8b088697b7ad4d0d, which renamed "strCommand" with "msg_type" in the network processing code. -BEGIN VERIFY SCRIPT- # Rename in test framework sed -i 's/command/msgtype/g' ./test/functional/test_framework/messages.py ./test/functional/test_framework/mininode.py # Rename in individual tests sed -i 's/command/msgtype/g' ./test/functional/p2p_invalid_messages.py ./test/functional/p2p_leak.py -END VERIFY SCRIPT- ``` Backport of core [[bitcoin/bitcoin#18610 | PR18610]]. Test Plan: ninja check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D8461
This is a follow-up PR to #18533, which changed the naming of
strCommand
tomsg_type
in the network processing code. The same approach is done here for the function test framework, to get rid of the wrong "command" terminology for network mesage types. (Commands are usually used in the CLI or RPC context, so using the same name in the network message context would only be confusing.)The commit was created through the following steps:
test/functional
git grep -i command test/functional > command_finds
The name
msgtype
was intentionally chosen without the underscore_
as classes beginning withmsg_
define concrete types of messages.