[tests] Dead mininode code #11638

pull jnewbery wants to merge 4 commits into bitcoin:master from jnewbery:dead_mininode_code changing 2 files +32 −193
  1. jnewbery commented at 8:49 pm on November 8, 2017: member

    This is the first part of #11518. It removes a ~150 lines of unused code from the mininode module:

    • remove unused deliver_sleep_time and EarlyDisconnectError code
    • remove support for pre-BIP31 ping messages
    • remove support for alert message
    • explicitly don’t support p2p versions lower than 60001

    Should be an easy ACK for reviewers. If all extended tests pass, then this code really was dead :)

  2. [tests] Remove dead code from mininode.py
    Removes the dead deliver_sleep_time and EarlyDisconnectError code
    2904e301c5
  3. [tests] Remove support for bre-BIP31 ping messages
    BIP31 support was added to Bitcoin Core in version 0.6.1. Our test
    framework is incompatible with Bitcoin Core versions that old, so remove
    all special logic for handling pre-BIP31 pings.
    c0b1274705
  4. [tests] Remove support for p2p alert messages
    Alert messages were removed in p2p version 70013 (Bitcoin Core V0.13.0)
    3858aabbd0
  5. [tests] Explicitly disallow support for p2p versions below 60001
    The mininode module includes code to support p2p versions below
    60001. However, the test_framework does not support versions
    of Bitcoin Core before V0.13.0. Remove code supporting
    p2p versions before 60001 (which has never been run).
    fb00c45c32
  6. fanquake added the label Tests on Nov 8, 2017
  7. jamesob approved
  8. jamesob commented at 4:46 am on November 9, 2017: member

    utACK https://github.com/bitcoin/bitcoin/pull/11638/commits/fb00c45c32ef061d7f16672bca170d47f1f0b772

    Grep’s happy with the removal:

    0(venv)  [Wed 8 20:42] james/tmp/bitcoin fb00c45c3* 
    1 $ for i in on_alert BIP0031_VERSION CUnisgnedAlert CAlert msg_alert msg_ping_prebip31 get_deliver_sleep_time EarlyDisconnectError; do git grep $i | cat; done
    2
    3src/net.cpp:                else if (nTime - pnode->nLastRecv > (pnode->nVersion > BIP0031_VERSION ? TIMEOUT_INTERVAL : 90*60))
    4src/net_processing.cpp:        if (pfrom->nVersion > BIP0031_VERSION)
    5src/net_processing.cpp:            if (pto->nVersion > BIP0031_VERSION) {
    6src/version.h:static const int BIP0031_VERSION = 60000;
    7doc/developer-notes.md:class CAlert
    
  9. practicalswift commented at 8:42 am on November 9, 2017: contributor

    Very nice cleanup!

    utACK fb00c45c32ef061d7f16672bca170d47f1f0b772

  10. laanwj commented at 1:15 pm on November 9, 2017: member

    utACK fb00c45

    (there’s an argument to leave support for older versions in the mininode framework: we might want to test how the code interacts with older versions. But 60001 as bottom is fine, apparently that was introduced in 0.6.2, that’s ancient history)

  11. jnewbery commented at 2:49 pm on November 9, 2017: member

    (there’s an argument to leave support for older versions in the mininode framework: we might want to test how the code interacts with older versions. But 60001 as bottom is fine, apparently that was introduced in 0.6.2, that’s ancient history)

    Exactly. See the commit message for c0b1274705f89de86db90bb31d6eb2164639dded:

    0BIP31 support was added to Bitcoin Core in version 0.6.1. Our test
    1framework is incompatible with Bitcoin Core versions that old, so remove
    2all special logic for handling pre-BIP31 pings.
    
  12. MarcoFalke commented at 6:48 pm on November 9, 2017: member
    utACK fb00c45c32ef061d7f16672bca170d47f1f0b772
  13. MarcoFalke merged this on Nov 9, 2017
  14. MarcoFalke closed this on Nov 9, 2017

  15. MarcoFalke referenced this in commit 5e3f5e4f25 on Nov 9, 2017
  16. jnewbery deleted the branch on Nov 9, 2017
  17. PastaPastaPasta referenced this in commit d7757195e9 on Sep 11, 2019
  18. PastaPastaPasta referenced this in commit 3b53fa05d3 on Feb 13, 2020
  19. PastaPastaPasta referenced this in commit fd43baaac7 on Feb 13, 2020
  20. PastaPastaPasta referenced this in commit 713e899591 on Feb 13, 2020
  21. PastaPastaPasta referenced this in commit a42d62d89e on Feb 29, 2020
  22. ckti referenced this in commit da803f795c on Mar 28, 2021
  23. gades referenced this in commit c89c8f29e8 on Jun 30, 2021
  24. DrahtBot locked this on Sep 8, 2021

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

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