scripted-diff: test: rename MAX_{ANCESTORS,DESCENDANTS} to DEFAULT_{ANCESTOR,DESCENDANT}_LIMIT #25810

pull theStack wants to merge 2 commits into bitcoin:master from theStack:202208-test-rename_default_ancestor_descendant_limits changing 3 files +35 −30
  1. theStack commented at 1:13 pm on August 9, 2022: contributor
    This PR renames the default in-mempool max ancestors/descendants constants MAX_ANCESTORS/MAX_DESCENDANTS in the functional tests to match the ones in the codebase: https://github.com/bitcoin/bitcoin/blob/c012875b9ded0a5183602f002738ca823d559518/src/policy/policy.h#L58-L59 https://github.com/bitcoin/bitcoin/blob/c012875b9ded0a5183602f002738ca823d559518/src/policy/policy.h#L62-L63 The custom limit constants MAX_ANCESTORS_CUSTOM/MAX_DESCENDANTS_CUSTOM are also renamed accordingly to better fit to this naming style. In the second commit, the default constants are deduplicated by moving them into the messages.py module. (Not sure if this module is really appropriate, as it doesn’t have a connection to messages. If someone has a good suggestion, would be glad to hear it.)
  2. scripted-diff: test: rename `MAX_{ANCESTORS,DESCENDANTS}` to `DEFAULT_{ANCESTOR,DESCENDANT}_LIMIT`
    -BEGIN VERIFY SCRIPT-
    ren() { sed -i "s:$1:$2:g" $(git grep -l "$1" ./test); }
    
    ren MAX_ANCESTORS_CUSTOM    CUSTOM_ANCESTOR_LIMIT
    ren MAX_DESCENDANTS_CUSTOM  CUSTOM_DESCENDANT_LIMIT
    ren MAX_ANCESTORS           DEFAULT_ANCESTOR_LIMIT
    ren MAX_DESCENDANTS         DEFAULT_DESCENDANT_LIMIT
    -END VERIFY SCRIPT-
    0fda1c7df6
  3. test: refactor: deduplicate `DEFAULT_{ANCESTOR,DESCENDANT}_LIMIT` constants b4a5ab96b4
  4. theStack force-pushed on Aug 9, 2022
  5. fanquake added the label Tests on Aug 9, 2022
  6. fanquake requested review from glozow on Aug 9, 2022
  7. DrahtBot commented at 10:40 pm on August 9, 2022: contributor

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25792 (test: add tests for datacarrier and datacarriersize options by w0xlt)

    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.

  8. w0xlt approved
  9. glozow commented at 11:47 am on August 10, 2022: member
    utACK b4a5ab96b42957a0e2110525b9e2e450deda09c1
  10. glozow commented at 11:57 am on August 10, 2022: member

    In the second commit, the default constants are deduplicated by moving them into the messages.py module. (Not sure if this module is really appropriate, as it doesn’t have a connection to messages. If someone has a good suggestion, would be glad to hear it.)

    This seems fine given non-p2p-protocol constants like MAX_BIP125_RBF_SEQUENCE and COIN are there. Pinging to see if @MarcoFalke has some vision for organizing this kind of stuff.

  11. fanquake approved
  12. fanquake commented at 3:53 pm on August 10, 2022: member
    ACK b4a5ab96b42957a0e2110525b9e2e450deda09c1
  13. MarcoFalke merged this on Aug 10, 2022
  14. MarcoFalke closed this on Aug 10, 2022

  15. sidhujag referenced this in commit f8036f6e26 on Aug 11, 2022
  16. theStack deleted the branch on Aug 11, 2022
  17. bitcoin locked this on Aug 11, 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: 2024-10-05 01:12 UTC

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