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
  1. RandyMcMillan commented at 12:48 AM on January 25, 2022: contributor

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

  2. 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.

  3. RandyMcMillan renamed this:
    net/p2p:rename COMMAND_SIZE to MESSAGE_SIZE
    WIP: net/p2p:rename COMMAND_SIZE to MESSAGE_SIZE
    on Jan 25, 2022
  4. RandyMcMillan marked this as a draft on Jan 25, 2022
  5. RandyMcMillan force-pushed on Jan 25, 2022
  6. RandyMcMillan marked this as ready for review on Jan 25, 2022
  7. DrahtBot added the label P2P on Jan 25, 2022
  8. RandyMcMillan force-pushed on Jan 25, 2022
  9. RandyMcMillan marked this as a draft on Jan 25, 2022
  10. RandyMcMillan force-pushed on Jan 25, 2022
  11. RandyMcMillan marked this as ready for review on Jan 25, 2022
  12. RandyMcMillan force-pushed on Jan 25, 2022
  13. RandyMcMillan force-pushed on Jan 25, 2022
  14. 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
  15. RandyMcMillan force-pushed on Jan 25, 2022
  16. RandyMcMillan force-pushed on Jan 25, 2022
  17. RandyMcMillan force-pushed on Jan 25, 2022
  18. RandyMcMillan marked this as a draft on Jan 25, 2022
  19. RandyMcMillan force-pushed on Jan 25, 2022
  20. RandyMcMillan force-pushed on Jan 25, 2022
  21. RandyMcMillan force-pushed on Jan 25, 2022
  22. RandyMcMillan force-pushed on Jan 25, 2022
  23. 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-
    34a1d3b0cb
  24. RandyMcMillan force-pushed on Jan 25, 2022
  25. 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.

  26. 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.

  27. DrahtBot added the label Needs rebase on Jan 27, 2022
  28. 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>

  29. RandyMcMillan closed this on Mar 19, 2022

  30. DrahtBot locked this on Mar 19, 2023

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-04-17 15:14 UTC

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