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: member

    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: member

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

    Conflicts

    No conflicts as of last run.

  5. DrahtBot added the label Needs rebase on Apr 13, 2020
  6. theStack force-pushed on Apr 13, 2020
  7. DrahtBot removed the label Needs rebase on Apr 13, 2020
  8. practicalswift commented at 5:16 pm on April 13, 2020: contributor
    Concept ACK: consistent naming is better than inconsistent naming.
  9. 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
  10. DrahtBot added the label Needs rebase on Apr 15, 2020
  11. 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
  12. theStack force-pushed on Apr 15, 2020
  13. theStack commented at 1:43 pm on April 15, 2020: member
    Rebased.
  14. 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
  15. DrahtBot removed the label Needs rebase on Apr 15, 2020
  16. MarcoFalke merged this on Apr 19, 2020
  17. MarcoFalke closed this on Apr 19, 2020

  18. sidhujag referenced this in commit ab8d4f3851 on Apr 20, 2020
  19. MarcoFalke referenced this in commit 62948caf44 on Jun 19, 2020
  20. sidhujag referenced this in commit c47c194b1a on Jul 7, 2020
  21. jasonbcox referenced this in commit ce3237e107 on Nov 19, 2020
  22. theStack deleted the branch on Dec 1, 2020
  23. DrahtBot 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: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me