test: Add `msgtype` to `msg_generic` slots #32833

pull dergoegge wants to merge 1 commits into bitcoin:master from dergoegge:2025-06-fix-msg_generic changing 1 files +1 −1
  1. dergoegge commented at 10:17 AM on June 30, 2025: member

    msg_generic can't be used unless msgtype is listed in __slots__

    Example from a custom test:

    2025-06-30T10:14:55.418000Z TestFramework (INFO): PRNG seed is: 3137163719543762151
    2025-06-30T10:14:55.418000Z TestFramework (INFO): Initializing test directory /tmp/nix-shell-110135-0/bitcoin_func_test_7lmiemmp
    2025-06-30T10:14:55.675000Z TestFramework (INFO): Setting up connections & mining some blocks...
    2025-06-30T10:14:56.511000Z TestFramework (ERROR): Unexpected exception caught during testing
    Traceback (most recent call last):
      File "/home/dergoegge/workspace/bitcoin/worktrees/master/test/functional/test_framework/test_framework.py", line 189, in main
        self.run_test()
      File "/home/dergoegge/workspace/bitcoin/worktrees/master/./build/test/functional/p2p_bug28676.py", line 46, in run_test
        self.connections[0].send_without_ping(msg_generic(b"block", bytes.fromhex("0500000006226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f06b816712ffab8c59299a6abb58ccefa1995a1368ca4348782ef268cbc9bacacdbe5494dffff7f200200000001010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff075105ffffffff00ffffffff0200f90295000000002200204ae81572f06e1b88fd5ced7a1a000945432e83e1551e6f721ee9c00b8cc332600000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90120000000000000000000000000000000000000000000000000000000000000000000000000")))
      File "/home/dergoegge/workspace/bitcoin/worktrees/master/test/functional/test_framework/messages.py", line 1386, in __init__
        self.msgtype = msgtype
    AttributeError: 'msg_generic' object has no attribute 'msgtype'
    
  2. test: Add msgtype to msg_generic slots 7dc43ea503
  3. DrahtBot added the label Tests on Jun 30, 2025
  4. DrahtBot commented at 10:17 AM on June 30, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, theStack

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko commented at 10:23 AM on June 30, 2025: member

    lgtm ACK 7dc43ea503a2c145ffd4fe14b794300bfc2bcdee

    Could add a small smoke test, maybe in ./test/functional/p2p_ping.py, but seems fine either way

  6. theStack approved
  7. theStack commented at 11:24 AM on June 30, 2025: contributor

    ACK 7dc43ea503a2c145ffd4fe14b794300bfc2bcdee

  8. dergoegge commented at 12:11 PM on June 30, 2025: member

    Could add a small smoke test, maybe in ./test/functional/p2p_ping.py, but seems fine either way

    Not gonna do it here, but if someone wants to do it in a follow up, I can review

  9. fanquake merged this on Jun 30, 2025
  10. fanquake closed this on Jun 30, 2025

  11. fanquake referenced this in commit 4b656e2023 on Jun 30, 2025
  12. fanquake commented at 12:30 PM on June 30, 2025: member

    Backported to 29.x in #32810.

  13. maflcko commented at 12:57 PM on June 30, 2025: member
  14. fanquake referenced this in commit d360a6ef56 on Jul 3, 2025
  15. stringintech referenced this in commit f19e7819e9 on Jul 19, 2025
  16. alexanderwiederin referenced this in commit 9997c3d993 on Jul 25, 2025
  17. alexanderwiederin referenced this in commit 8d6ebb9c4e on Jul 28, 2025
  18. alexanderwiederin referenced this in commit 533a4585b5 on Jul 28, 2025
  19. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  20. bug-castercv502 referenced this in commit d4bd8a1259 on Sep 28, 2025
  21. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  22. morozow referenced this in commit 73a977c992 on May 8, 2026
  23. morozow referenced this in commit 458fcf63d5 on May 8, 2026
  24. Kino1994 referenced this in commit 9f61f7af75 on Jun 28, 2026
  25. BigcoinBGC referenced this in commit bce971198b on Jun 30, 2026
  26. bitcoin locked this on Jul 30, 2026

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-08-06 18:52 UTC

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