Skip to content

Conversation

S3RK
Copy link
Contributor

@S3RK S3RK commented Jul 21, 2020

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

@@ -341,8 +341,8 @@ class CRegTestParams : public CChainParams {

void CRegTestParams::UpdateActivationParametersFromArgs(const ArgsManager& args)
{
if (gArgs.IsArgSet("-segwitheight")) {
int64_t height = gArgs.GetArg("-segwitheight", consensus.SegwitHeight);
if (args.IsArgSet("-segwitheight")) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@maflcko
Copy link
Member

maflcko commented Jul 21, 2020

scripted diffs shouldn't modify out-of-git-tree files. Please replace the wildcard; See other scripted diffs for examples.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 21, 2020

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

Conflicts

Reviewers, 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.

This was referenced Jul 21, 2020
@fanquake fanquake requested a review from ryanofsky July 22, 2020 00:24
@maflcko
Copy link
Member

maflcko commented Jul 22, 2020

Concept ACK, apart from my feedback ofc

@S3RK
Copy link
Contributor Author

S3RK commented Jul 22, 2020

Updated scripted diff to avoid touching out-of-tree files

S3RK added 3 commits July 29, 2020 16:36
@maflcko
Copy link
Member

maflcko commented Jul 30, 2020

ACK 8ed9002 👛

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK 8ed9002cd14165f751442f738fbf1fb8a37611b2 👛
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUh2ZAwAnz4O1skNtfv/RUWHkHJzWfJq4jaAvEdKEd3Mgd8q2rAU8bvUGlrEwqCa
8ljMbgcBZbQVndx9E5QomFlEHx+C3TDjxDpU66sh5TM2qIQ7gGDA6NmMb5pabSRx
bNG1OGDclMN2PiWWmtvKvKx5XgGUb3O7h1gpl3NJJsC/52RvU/mcY3Is9VoLwEs3
9rD9RM5pE7VLa9l2tZiaQrp7d1EHeqKtgcIAYCoChACi44wV+HYdtQa0kzwg2LhO
PMhtjws0damzM899I8PGApDjLlDTm61ShQJkoO42LxIHt4Sjs38kBl209MqixEd2
Vhsw7cDFcCmqALLOXP6zuhd1cq3NY4q31e2cL3RjhnxOz1gTmirQrWZXH8Y8MmdC
/2XT3E0kFKp+FGu5uL8WjS8/5bq0mfSGPfp7WCVEsFdRZdOdfNlrqdiTpSa9apXO
DHEzLehro9PCsVT64GelPwGaL9Y6NKEUqu5nYo0WnLTwUzpOvOePYfuAoLFeOVsy
x0xmmPVv
=CHO8
-----END PGP SIGNATURE-----

Timestamp of file with hash e25142d47fe5c4ec133bc1f892c23685dd05953099c70d44b4fe8f4bd41adb03 -

@maflcko maflcko merged commit 62d137a into bitcoin:master Jul 30, 2020
@S3RK S3RK deleted the args_manager branch September 25, 2020 02:07
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 14, 2020
Summary:
```
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().
```

Backport of core [[bitcoin/bitcoin#19561 | PR19561]].

Depends on D8643.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8644
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass ArgsManager into functions that register args with AddArg
4 participants