aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/node.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2020-05-20 15:06:37 -0400
committerMarcoFalke <[email protected]>2020-05-20 15:11:51 -0400
commit3eda7ea9ba724bfa53ad6f4f63af85fccb46da00 (patch)
tree8396830aefc33a70bf7e48f8b8aee81f895ebe04 /src/interfaces/node.cpp
parentMerge #18317: Serialization improvements step 6 (all except wallet/gui) (diff)
parenttest: explicit imports from test_framework.messages in p2p_invalid_messages.py (diff)
downloaddiscoin-3eda7ea9ba724bfa53ad6f4f63af85fccb46da00.tar.xz
discoin-3eda7ea9ba724bfa53ad6f4f63af85fccb46da00.zip
Merge #18764: refactor: test: replace inv type magic numbers by constants
4a614ff88ac71d6457513a4f7aa8a3235874ff3f test: explicit imports from test_framework.messages in p2p_invalid_messages.py (Sebastian Falbesoner) b35e1d2471c3d9e0b6cc4b94f4726a7e6ea32206 test: add inventory type constant MSG_CMPCT_BLOCK (Sebastian Falbesoner) eeaaa58d2ccc243a7506d34bca47c678867d6dd5 test: replace inv type magic numbers by constants (Sebastian Falbesoner) Pull request description: Many functional tests still use magic numbers for inventory types, either passed to the `CInv` constructor or for comparing the `type` member of `CInv`. This PR replaces all of those by constants in the module `test_framework.messages` that have been introduced in commit c32cf9f62285b5cd18a5064aee91f0802f0f87a8: `MSG_TX` (1) or `MSG_BLOCK` (2). It also introduces a new constant `MSG_CMPCT_BLOCK` (naming as in `src/protocol.h`) and uses it to replace the remaining magic numbers. The occurences of the magic numbers were identified through `grep`ing for `CInv(` and `type ==`. The idea was first to create a scripted-diff, but since also adding missing `import`s is needed, this would be non-trivial. Besides, also some unneeded comments like `# 2 == "Block"` could be removed. ACKs for top commit: gzhao408: ACK [`4a614ff`](https://github.com/bitcoin/bitcoin/pull/18764/commits/4a614ff88ac71d6457513a4f7aa8a3235874ff3f) Tree-SHA512: 4ba4fdef9f3eef7fd5ac72cb03ca3524863d1ae292161c550424a4c1047283fa2d2e7e03017d1fbae3652b3cb14f08b8d4b368403f3f209993aef3f2e2b22784
Diffstat (limited to 'src/interfaces/node.cpp')
0 files changed, 0 insertions, 0 deletions