tests: Remove unused constant MAX_INV_SZ #13068

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:MAX_INV_SZ changing 1 files +0 −1
  1. practicalswift commented at 7:06 PM on April 24, 2018: contributor

    Remove unused constant MAX_INV_SZ.

    Last use removed in 9c92c8c82716d0c35b638142a1125d07b3f240a8.

  2. tests: Remove unused constant MAX_INV_SZ
    Last use removed in 9c92c8c82716d0c35b638142a1125d07b3f240a8
    d66943d453
  3. fanquake added the label Tests on Apr 24, 2018
  4. Empact commented at 3:56 AM on April 25, 2018: member

    utACK d66943d there are other references, but all in .cpp/.h

  5. laanwj commented at 6:42 AM on April 25, 2018: member

    Concept ACK - though I wonder if we shouldn't, instead, add a test that uses this, e.g. tests that this is the maximum number of INVs returned?

  6. practicalswift commented at 8:18 AM on April 25, 2018: contributor

    @laanwj Yes, more testing would be nice! This PR is "up for grabs" for someone who can take on that task :-)

  7. MarcoFalke added the label Up for grabs on Apr 25, 2018
  8. fanquake closed this on Apr 26, 2018

  9. practicalswift commented at 8:16 PM on April 26, 2018: contributor

    @fanquake I was about to push a new version with a short TODO about the lack of testing covering MAX_INV_SZ, but I saw that this PR was closed. Keeping unused variables around feels sloppy – better comment it out and add a comment about the lack of test coverage.

    --- a/test/functional/test_framework/messages.py
    +++ b/test/functional/test_framework/messages.py
    @@ -31,7 +31,9 @@ MY_VERSION = 70014  # past bip-31 for ping/pong
     MY_SUBVERSION = b"/python-mininode-tester:0.0.3/"
     MY_RELAY = 1 # from version 70001 onwards, fRelay should be appended to version messages (BIP37)
    
    -MAX_INV_SZ = 50000
    +# TODO: Add a test test that uses MAX_INV_SZ - e.g. tests that this is the maximum number of INVs returned
    +# MAX_INV_SZ = 50000
    +
     MAX_BLOCK_BASE_SIZE = 1000000
    
     COIN = 100000000  # 1 btc in satoshis
    

    Makes sense?

  10. laanwj commented at 8:44 PM on April 26, 2018: member

    @practicalswift No strong opinion about that, I can't re-open the PR for some reason, I think you need to push back the old branch before that is possible.

  11. practicalswift commented at 7:36 AM on April 27, 2018: contributor

    @laanwj Actually I've already force pushed to the old branch – see below :-)

    $ git diff HEAD~1..HEAD
    diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py
    index ca2e425..43f37d9 100755
    --- a/test/functional/test_framework/messages.py
    +++ b/test/functional/test_framework/messages.py
    @@ -31,7 +31,9 @@ MY_VERSION = 70014  # past bip-31 for ping/pong
     MY_SUBVERSION = b"/python-mininode-tester:0.0.3/"
     MY_RELAY = 1 # from version 70001 onwards, fRelay should be appended to version messages (BIP37)
    
    -MAX_INV_SZ = 50000
    +# TODO: Add a test test that uses MAX_INV_SZ - e.g. tests that this is the maximum number of INVs returned
    +# MAX_INV_SZ = 50000
    +
     MAX_BLOCK_BASE_SIZE = 1000000
    
     COIN = 100000000  # 1 btc in satoshis
    $ git push -f
    Everything up-to-date
    
  12. MarcoFalke removed the label Up for grabs on Mar 5, 2019
  13. DrahtBot locked this on Dec 16, 2021
Labels

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-16 15:15 UTC

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