scripted-diff: get rid of remaining “command” terminology in protocol.{h,cpp} #31163

pull theStack wants to merge 1 commits into bitcoin:master from theStack:202410-remaining_command_terminology changing 11 files +53 −53
  1. theStack commented at 10:02 pm on October 26, 2024: contributor
    The confusing “command” terminology for the 12-byte field in the (v1) p2p message header was replaced with the more proper term “message type” in other modules already years ago, see eg #18533, #18937, #24078, #24141. This PR does the same for the protocol.{h,cpp} module to complete the replacements. Note that “GetCommand” is a method name also used in the ArgsManager (there it makes much more sense), so the scripted-diff lists for this replacement the files explicitly, rather than using $(git grep -l ...).
  2. scripted-diff: get rid of remaining "command" terminology in protocol.{h,cpp}
    -BEGIN VERIFY SCRIPT-
    sed -i s/COMMAND_SIZE/MESSAGE_TYPE_SIZE/g $(git grep -l COMMAND_SIZE)
    sed -i s/pszCommand/msg_type/g $(git grep -l pszCommand)
    sed -i s/pchCommand/m_msg_type/g $(git grep -l pchCommand)
    sed -i s/GetCommand/GetMessageType/g ./src/net.cpp ./src/protocol.cpp ./src/protocol.h ./src/test/fuzz/protocol.cpp
    sed -i s/IsCommandValid/IsMessageTypeValid/g $(git grep -l IsCommandValid)
    sed -i "s/command/message type/g" ./src/protocol.h ./src/protocol.cpp
    -END VERIFY SCRIPT-
    4120c7543e
  3. DrahtBot commented at 10:02 pm on October 26, 2024: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31163.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK rkrux, maflcko, fjahr
    Concept ACK laanwj

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Refactoring on Oct 26, 2024
  5. laanwj commented at 9:16 am on October 27, 2024: member
    Concept ACK, always has been a pet peeve of mine.
  6. rkrux approved
  7. rkrux commented at 12:17 pm on November 1, 2024: none

    tACK 4120c7543ee32efed7396d7153411ecbbd588ad3

    Successful make and functional tests. I tested the script using the script checker script without any issues; ended up installing gnu sed and gnu grep on my MAC.

    0➜  bitcoin git:(202410-remaining_command_terminology) ✗ test/lint/commit-script-check.sh 2a52718d734cf65aaeeb18f627547e5bca3483f4..4120c7543ee32efed7396d7153411ecbbd588ad3
    1Running script for: 4120c7543ee32efed7396d7153411ecbbd588ad3
    2sed -i s/COMMAND_SIZE/MESSAGE_TYPE_SIZE/g $(git grep -l COMMAND_SIZE)
    3sed -i s/pszCommand/msg_type/g $(git grep -l pszCommand)
    4sed -i s/pchCommand/m_msg_type/g $(git grep -l pchCommand)
    5sed -i s/GetCommand/GetMessageType/g ./src/net.cpp ./src/protocol.cpp ./src/protocol.h ./src/test/fuzz/protocol.cpp
    6sed -i s/IsCommandValid/IsMessageTypeValid/g $(git grep -l IsCommandValid)
    7sed -i "s/command/message type/g" ./src/protocol.h ./src/protocol.cpp
    8OK
    
  8. DrahtBot requested review from laanwj on Nov 1, 2024
  9. maflcko commented at 12:42 pm on November 8, 2024: member

    Makes sense to change the remaining ones as well for consistency.

    review ACK 4120c7543ee32efed7396d7153411ecbbd588ad3 🛒

    Signature:

    0untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
    1RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
    2trusted comment: review ACK 4120c7543ee32efed7396d7153411ecbbd588ad3 🛒
    37vjp2D1kDy9UmqzutdkVvYk7liAUtZbaDL2JgIy7nV9sObdoKSAsgJMdXvpiR4SvnlI0HXlpm/4U+vZih4+JAw==
    
  10. fjahr commented at 0:17 am on November 10, 2024: contributor

    Code review ACK 4120c7543ee32efed7396d7153411ecbbd588ad3

    Did some light checks to see if anything was missed and reviewed changes.

  11. fanquake merged this on Nov 11, 2024
  12. fanquake closed this on Nov 11, 2024

  13. theStack deleted the branch on Nov 11, 2024

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-23 18:12 UTC

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