doc, test: Improve setup_clean_chain documentation #21042

pull fjahr wants to merge 2 commits into bitcoin:master from fjahr:scc-docs changing 18 files +11 −20
  1. fjahr commented at 8:53 PM on January 31, 2021: contributor

    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 renamesetup_clean_chain.

  2. fjahr cross-referenced this on Jan 31, 2021 from issue Refactor: Improve setup_clean_chain semantics by fjahr
  3. DrahtBot added the label Docs on Jan 31, 2021
  4. DrahtBot added the label Tests on Jan 31, 2021
  5. in test/functional/README.md:69 in 39718affb1 outdated
      68 | -  contain a 200-block pre-mined blockchain and wallets for four nodes. Each node
      69 | -  has 25 mature blocks (25x50=1250 BTC) in its wallet.
      70 | +- Set the `self.setup_clean_chain` variable in `set_test_params()` to `True` if
      71 | +  you don't want to use the cached data directories (defaults to `False`). The
      72 | +  cached data directories contain a 200-block pre-mined blockchain and wallets
      73 | +  for four nodes. Each node has 25 mature blocks (25x50=1250 BTC) in its wallet.
    


    MarcoFalke commented at 9:46 AM on February 1, 2021:

    Strictly speaking, it doesn't contain any wallets, only 'chainstate', 'blocks'


    jonatack commented at 9:22 PM on February 1, 2021:

    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."


    fjahr commented at 10:18 PM on February 1, 2021:

    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.

  6. MarcoFalke approved
  7. MarcoFalke commented at 9:48 AM on February 1, 2021: member

    ACK

  8. jonatack commented at 9:23 PM on February 1, 2021: contributor

    Concept ACK

  9. doc: Improve setup_clean_chain documentation 98892f39e3
  10. scripted-diff: Remove setup_clean_chain if default is not changed
    -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-
    590bda79e8
  11. fjahr force-pushed on Feb 1, 2021
  12. jonatack commented at 11:34 PM on February 1, 2021: contributor

    ACK 590bda79e876d9b959083105b8c7c41dd87706eb

    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)

  13. MarcoFalke merged this on Feb 4, 2021
  14. MarcoFalke closed this on Feb 4, 2021

  15. sidhujag referenced this in commit b1cb30a38d on Feb 4, 2021
  16. Fabcien referenced this in commit 10b46554f4 on Jan 20, 2022
  17. bitcoin locked this on Aug 16, 2022

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-05-19 06:53 UTC