-
Notifications
You must be signed in to change notification settings - Fork 37.7k
doc, test: Improve setup_clean_chain documentation #21042
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
Conversation
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
test/functional/README.md
Outdated
- Set the `self.setup_clean_chain` variable in `set_test_params()` to `True` if | ||
you don't want to use the cached data directories (defaults to `False`). The | ||
cached data directories contain a 200-block pre-mined blockchain and wallets | ||
for four nodes. Each node has 25 mature blocks (25x50=1250 BTC) in its wallet. |
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.
Strictly speaking, it doesn't contain any wallets
, only 'chainstate', 'blocks'
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.
possible alternative structure for the first sentence (so that true describes a positive action rather than a negation)
"...to True
to initialize an empty blockchain, rather than load a premined blockchain from cache with the default value of False
."
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.
And wallets also doesn't have blocks in them :) I improved the clunky parts of that paragraph a bit further, taking @jonatack 's suggested sentence with a minor tweak.
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.
Concept ACK
test/functional/README.md
Outdated
- Set the `self.setup_clean_chain` variable in `set_test_params()` to `True` if | ||
you don't want to use the cached data directories (defaults to `False`). The | ||
cached data directories contain a 200-block pre-mined blockchain and wallets | ||
for four nodes. Each node has 25 mature blocks (25x50=1250 BTC) in its wallet. |
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.
possible alternative structure for the first sentence (so that true describes a positive action rather than a negation)
"...to True
to initialize an empty blockchain, rather than load a premined blockchain from cache with the default value of False
."
-BEGIN VERIFY SCRIPT- git grep -l "self.setup_clean_chain = False" test/functional/*.py | xargs sed -i "/self.setup_clean_chain = False/d"; -END VERIFY SCRIPT-
ACK 590bda7 nit if you retouch, s/premined/pre-mined/ or choose between "premined" or "pre-mined" (both versions are used in the diff, which is my fault from my suggestion) |
Summary: ``` The first commit improves documentation on setup_clean_chain which is misunderstood quite frequently. Most importantly it fixes the TestShell docs which are simply incorrect. The second commit removes the instances of setup_clean_clain in functional tests where it is not changing the default. ``` Backport of [[bitcoin/bitcoin#21042 | core#21042]]. Test Plan: ninja check-functional-extended In `test/functional`, run: git grep 'self.setup_clean_chain = False' and check the is no occurrence in the test outside of the framework itself. Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D10853
The first commit improves documentation on setup_clean_chain which is misunderstood quite frequently. Most importantly it fixes the TestShell docs which are simply incorrect.
The second commit removes the instances of
setup_clean_clain
in functional tests where it is not changing the default.This used to be part of #19168 which also sought to rename
setup_clean_chain
.