refactor: Pass ArgsManager into functions that register args #19561

pull S3RK wants to merge 3 commits into bitcoin:master from S3RK:args_manager changing 11 files +242 −237
  1. S3RK commented at 11:08 am on July 21, 2020: member

    Rationale: reduce use of gArgs to decouple code and simplify future maintenance and easier unit testing.

    This PR is continuation of work started in #18926 and #18662 It covers only places that register args in ArgsManager with AddArgs() or AddHiddenArgs().

    Closes #19511

  2. in src/chainparams.cpp:344 in 68c10a1bbc outdated
    340@@ -341,8 +341,8 @@ class CRegTestParams : public CChainParams {
    341 
    342 void CRegTestParams::UpdateActivationParametersFromArgs(const ArgsManager& args)
    343 {
    344-    if (gArgs.IsArgSet("-segwitheight")) {
    345-        int64_t height = gArgs.GetArg("-segwitheight", consensus.SegwitHeight);
    346+    if (args.IsArgSet("-segwitheight")) {
    


    S3RK commented at 11:10 am on July 21, 2020:
    This line had been added when local args already existed. I couldn’t find any reason for the use of global variable, but maybe I’m missing something.
  3. MarcoFalke commented at 11:40 am on July 21, 2020: member
    scripted diffs shouldn’t modify out-of-git-tree files. Please replace the wildcard; See other scripted diffs for examples.
  4. fanquake added the label Refactoring on Jul 21, 2020
  5. DrahtBot commented at 12:14 pm on July 21, 2020: member

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #19624 (Interpret and validate rw_settings by MarcoFalke)
    • #19573 ([WIP] Replace unused BIP 9 logic with BIP 8 by luke-jr)
    • #19572 (ZMQ: Create “sequence” notifier, enabling client-side mempool tracking by instagibbs)
    • #19509 (Per-Peer Message Logging by troygiorshev)
    • #19485 (torcontrol: Create also a V3 ed25519-V3 onion address. by Saibato)
    • #19471 (util: Make default arg values more specific by hebasto)
    • #19460 (multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky)
    • #19242 (Add -uaappend option to append a literal string to user agent by luke-jr)
    • #19241 (help: Generate checkpoint height from chainparams by luke-jr)
    • #19137 (wallettool: Add dump and createfromdump commands by achow101)
    • #19043 (torcontrol: add -tortarget config by MDrollette)
    • #18418 (wallet: Increase OUTPUT_GROUP_MAX_ENTRIES to 100 by fjahr)
    • #18267 (BIP-325: Signet [consensus] by kallewoof)
    • #18077 (net: Add NAT-PMP port forwarding support by hebasto)
    • #17127 (util: Correct permissions for datadir and wallets subdir by hebasto)
    • #16546 (External signer support - Wallet Box edition by Sjors)
    • #15421 (torcontrol: Launch a private Tor instance when not already running by luke-jr)
    • #15367 (feature: Added ability for users to add a startup command by benthecarman)
    • #14582 (wallet: always do avoid partial spends if fees are within a specified range by kallewoof)
    • #14053 (Add address-based index (attempt 4?) by marcinja)
    • #10443 (Add fee_est tool for debugging fee estimation code by ryanofsky)
    • #10102 ([experimental] Multiprocess bitcoin by ryanofsky)

    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.

  6. fanquake requested review from ryanofsky on Jul 22, 2020
  7. MarcoFalke commented at 8:28 am on July 22, 2020: member
    Concept ACK, apart from my feedback ofc
  8. S3RK force-pushed on Jul 22, 2020
  9. S3RK commented at 10:34 am on July 22, 2020: member
    Updated scripted diff to avoid touching out-of-tree files
  10. DrahtBot added the label Needs rebase on Jul 23, 2020
  11. refactor: add unused ArgsManager to replace gArgs a316e9ce26
  12. scripted-diff: Replace gArgs with local argsman
    -BEGIN VERIFY SCRIPT-
    sed -i -e 's/gArgs.Add/argsman.Add/g' `git grep -l "gArgs.Add"`
    -END VERIFY SCRIPT-
    9b20f66828
  13. refactor: use local argsmanager in CRegTestParams 8ed9002cd1
  14. S3RK force-pushed on Jul 29, 2020
  15. DrahtBot removed the label Needs rebase on Jul 29, 2020
  16. MarcoFalke commented at 9:52 am on July 30, 2020: member

    ACK 8ed9002cd14165f751442f738fbf1fb8a37611b2 👛

    Signature:

     0-----BEGIN PGP SIGNED MESSAGE-----
     1Hash: SHA512
     2
     3ACK 8ed9002cd14165f751442f738fbf1fb8a37611b2 👛
     4-----BEGIN PGP SIGNATURE-----
     5
     6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
     7pUh2ZAwAnz4O1skNtfv/RUWHkHJzWfJq4jaAvEdKEd3Mgd8q2rAU8bvUGlrEwqCa
     88ljMbgcBZbQVndx9E5QomFlEHx+C3TDjxDpU66sh5TM2qIQ7gGDA6NmMb5pabSRx
     9bNG1OGDclMN2PiWWmtvKvKx5XgGUb3O7h1gpl3NJJsC/52RvU/mcY3Is9VoLwEs3
    109rD9RM5pE7VLa9l2tZiaQrp7d1EHeqKtgcIAYCoChACi44wV+HYdtQa0kzwg2LhO
    11PMhtjws0damzM899I8PGApDjLlDTm61ShQJkoO42LxIHt4Sjs38kBl209MqixEd2
    12Vhsw7cDFcCmqALLOXP6zuhd1cq3NY4q31e2cL3RjhnxOz1gTmirQrWZXH8Y8MmdC
    13/2XT3E0kFKp+FGu5uL8WjS8/5bq0mfSGPfp7WCVEsFdRZdOdfNlrqdiTpSa9apXO
    14DHEzLehro9PCsVT64GelPwGaL9Y6NKEUqu5nYo0WnLTwUzpOvOePYfuAoLFeOVsy
    15x0xmmPVv
    16=CHO8
    17-----END PGP SIGNATURE-----
    

    Timestamp of file with hash e25142d47fe5c4ec133bc1f892c23685dd05953099c70d44b4fe8f4bd41adb03 -

  17. MarcoFalke merged this on Jul 30, 2020
  18. MarcoFalke closed this on Jul 30, 2020

  19. S3RK deleted the branch on Sep 25, 2020
  20. Fabcien referenced this in commit 318eba92a9 on Dec 14, 2020
  21. DrahtBot locked this on Feb 15, 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: 2024-06-29 10:13 UTC

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