Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Oct 29, 2015

Not sure if #6349 finds its way out of rebase hell anytime soon. Those three commits can be merged without rebase (I preserved the commit hashes)

They already got some sort of code review as part of #6349 so it's better to merge them without rebase, imo.

@maflcko maflcko closed this Oct 29, 2015
@maflcko maflcko deleted the lukejr-constants-no-mergeConf branch October 29, 2015 18:52
@@ -211,7 +211,7 @@ UniValue setgenerate(const UniValue& params, bool fHelp)
if (params.size() > 0)
fGenerate = params[0].get_bool();

int nGenProcLimit = -1;
int nGenProcLimit = GetArg("-genproclimit", DEFAULT_GENERATE_THREADS);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this changes from -1 to GetArg("-genproclimit", DEFAULT_GENERATE_THREADS) but in getmininginfo() the change is from -1 to DEFAULT_GENERATE_THREADS?

Copy link
Member Author

Choose a reason for hiding this comment

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

You still want to obey the command line arg if nothing is set via rpc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a bugfix or enhanced functionality? Again, why one uses GetArg() but the other doesn't?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it fixes one bug: If genproclimit is omitted to RPC setgenerate, don't change it; (copied from commit msg)

Copy link
Member Author

Choose a reason for hiding this comment

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

Making getmininginfo push back the "correct" value nGenProcLimit may involve some more work. But at least this PR did not introduce the issue. The PR is not perfect, but improves things considerably.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you. Everything else was completely trivial to review, but I thought this deserved a more detailed explanation.

@jonasschnelli
Copy link
Contributor

I think this is a good idea.
utACK.

Miner and Wallet init help strings could also slowly migrate into wallet/ miner/ classes. I once did this for the wallet, but it requires rebase and maybe more small, reviewable PRs: #5990

@maflcko maflcko reopened this Oct 29, 2015
@maflcko maflcko force-pushed the lukejr-constants-no-mergeConf branch from 693de4d to a6efc01 Compare October 29, 2015 23:32
@dcousens
Copy link
Contributor

utACK

@jtimon
Copy link
Contributor

jtimon commented Oct 30, 2015

utACK besides my nit/question.

@@ -404,12 +404,16 @@ std::string HelpMessage(HelpMessageMode mode)
if (showDebug)
{
strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", 1));
strUsage += HelpMessageOpt("-dblogsize=<n>", strprintf("Flush database activity from memory pool to disk log every <n> megabytes (default: %u)", 100));
#ifdef ENABLE_WALLET
strUsage += HelpMessageOpt("-dblogsize=<n>", strprintf("Flush wallet database activity from memory to disk log every <n> megabytes (default: %u)", DEFAULT_WALLET_DBLOGSIZE));
Copy link
Member

Choose a reason for hiding this comment

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

Good find on missing ENABLE_WALLET here

Copy link
Member Author

Choose a reason for hiding this comment

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

All credit goes to @luke-jr ;)

@laanwj
Copy link
Member

laanwj commented Nov 4, 2015

utACK

@laanwj laanwj merged commit a6efc01 into bitcoin:master Nov 4, 2015
laanwj added a commit that referenced this pull request Nov 4, 2015
a6efc01 Bugfix: Omit wallet-related options from -help when wallet is disabled (Luke Dashjr)
5f9260f Bugfix: If genproclimit is omitted to RPC setgenerate, don't change it; also show correct default in getmininginfo (Luke Dashjr)
420a82f Bugfix: Describe dblogsize option correctly (it refers to the wallet database, not memory pool) (Luke Dashjr)
caa3d42 Bugfix: RPC: blockchain: Display correct defaults in help for verifychain method (Luke Dashjr)
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 18, 2015
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 18, 2015
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 18, 2015
…t; also show correct default in getmininginfo

Github-Pull: bitcoin#6905
Rebased-From: 5f9260f
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 18, 2015
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 8, 2015
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 8, 2015
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 8, 2015
…t; also show correct default in getmininginfo

Github-Pull: bitcoin#6905
Rebased-From: 5f9260f
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 8, 2015
zkbot added a commit to zcash/zcash that referenced this pull request Mar 21, 2018
Misc upstream PRs

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6077
  - Second commit only (first was already applied to 0.11.X and then reverted)
- bitcoin/bitcoin#6284
- bitcoin/bitcoin#6489
- bitcoin/bitcoin#6462
- bitcoin/bitcoin#6647
- bitcoin/bitcoin#6235
- bitcoin/bitcoin#6905
- bitcoin/bitcoin#6780
  - Excluding second commit (QT) and third commit (requires bitcoin/bitcoin#6993)
- bitcoin/bitcoin#6961
  - Excluding QT parts, and a small `src/policy/policy.cpp` change which depends on a bunch of other PRs, which we'll have to remember to come back to.
- bitcoin/bitcoin#7044
- bitcoin/bitcoin#8856
- bitcoin/bitcoin#9002

Part of #2074 and #2132.
zkbot added a commit to zcash/zcash that referenced this pull request Dec 4, 2019
Misc upstream PRs

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6077
  - Second commit only (first was already applied to 0.11.X and then reverted)
- bitcoin/bitcoin#6284
- bitcoin/bitcoin#6489
- bitcoin/bitcoin#6235
- bitcoin/bitcoin#6905
- bitcoin/bitcoin#6780
  - Excluding second commit (QT) and third commit (requires bitcoin/bitcoin#6993)
- bitcoin/bitcoin#6961
  - Excluding QT parts, and a small `src/policy/policy.cpp` change which depends on a bunch of other PRs, which we'll have to remember to come back to.
- bitcoin/bitcoin#7044
- bitcoin/bitcoin#8856
- bitcoin/bitcoin#9002

Part of #2074 and #2132.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
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.

6 participants