scripted-diff: test: replace command with msgtype (naming) #18610

pull theStack wants to merge 1 commits into bitcoin:master from theStack:20200410-scripted-diff-test-rename-command-to-msgtype changing 4 files +49 −49
  1. theStack commented at 7:33 PM on April 12, 2020: contributor

    This is a follow-up PR to #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.

  2. DrahtBot added the label Refactoring on Apr 12, 2020
  3. DrahtBot added the label Tests on Apr 12, 2020
  4. DrahtBot commented at 10:07 PM on April 12, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  5. DrahtBot cross-referenced this on Apr 12, 2020 from issue test: complete impl. of msg_merkleblock and wait_for_merkleblock by theStack
  6. DrahtBot cross-referenced this on Apr 12, 2020 from issue test: enable opening partial p2p connections where useful by jonatack
  7. DrahtBot added the label Needs rebase on Apr 13, 2020
  8. theStack force-pushed on Apr 13, 2020
  9. DrahtBot removed the label Needs rebase on Apr 13, 2020
  10. practicalswift commented at 5:16 PM on April 13, 2020: contributor

    Concept ACK: consistent naming is better than inconsistent naming.

  11. DrahtBot cross-referenced this on Apr 14, 2020 from issue test: Add various low-level p2p tests by MarcoFalke
  12. MarcoFalke commented at 12:32 PM on April 15, 2020: member

    Concept ACK. Makes sense that tests use the same naming as Bitcoin Core. See NetMsgType here: https://doxygen.bitcoincore.org/namespace_net_msg_type.html

  13. DrahtBot added the label Needs rebase on Apr 15, 2020
  14. scripted-diff: test: replace command with msgtype
    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-
    9df32e820d
  15. theStack force-pushed on Apr 15, 2020
  16. theStack commented at 1:43 PM on April 15, 2020: contributor

    Rebased.

  17. MarcoFalke commented at 2:50 PM on April 15, 2020: member

    ACK 9df32e820d83aa74e2f175d8d63b5666b8b4ef0e . Makes sense that tests use the same naming as Bitcoin Core. See NetMsgType here: https://doxygen.bitcoincore.org/namespace_net_msg_type.html

  18. DrahtBot removed the label Needs rebase on Apr 15, 2020
  19. MarcoFalke merged this on Apr 19, 2020
  20. MarcoFalke closed this on Apr 19, 2020

  21. sidhujag referenced this in commit ab8d4f3851 on Apr 20, 2020
  22. theStack cross-referenced this on May 10, 2020 from issue refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg by theStack
  23. MarcoFalke referenced this in commit 62948caf44 on Jun 19, 2020
  24. sidhujag referenced this in commit c47c194b1a on Jul 7, 2020
  25. theStack cross-referenced this on Aug 6, 2020 from issue Per-Peer Message Capture by troygiorshev
  26. jasonbcox referenced this in commit ce3237e107 on Nov 19, 2020
  27. theStack deleted the branch on Dec 1, 2020
  28. bitcoin locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:54 UTC