-
Notifications
You must be signed in to change notification settings - Fork 38.6k
scripted-diff: test: rename MAX_{ANCESTORS,DESCENDANTS} to DEFAULT_{ANCESTOR,DESCENDANT}_LIMIT
#25810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripted-diff: test: rename MAX_{ANCESTORS,DESCENDANTS} to DEFAULT_{ANCESTOR,DESCENDANT}_LIMIT
#25810
Conversation
…_{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-
ba53aaa to
b4a5ab9
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
w0xlt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK b4a5ab9
glozow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK b4a5ab9
This seems fine given non-p2p-protocol constants like |
fanquake
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK b4a5ab9
This PR renames the default in-mempool max ancestors/descendants constants
MAX_ANCESTORS/MAX_DESCENDANTSin the functional tests to match the ones in the codebase:bitcoin/src/policy/policy.h
Lines 58 to 59 in c012875
bitcoin/src/policy/policy.h
Lines 62 to 63 in c012875
The custom limit constants
MAX_ANCESTORS_CUSTOM/MAX_DESCENDANTS_CUSTOMare also renamed accordingly to better fit to this naming style. In the second commit, the default constants are deduplicated by moving them into themessages.pymodule. (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.)