Skip to content
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

setgenerate command requires the genproclimit-cpu argument when generate is set to true. #466

Open
LordDarkHelmet opened this issue Jul 6, 2021 · 1 comment

Comments

@LordDarkHelmet
Copy link
Contributor

Describe the issue

Mining will not start if you issue the command:

dynamic-cli setgenerate true

In order to get it to work, you need to specify the genproclimit-cpu argument.

The documentation states that genproclimit-cpu is an optional argument. If you set the generate argument to true, it will not start mining, even if you specify the genproclimit=<some number> in your dynode.conf file.

Steps to reproduce

  1. run dynamic-cli setgenerate true
  2. run dynamic-cli getgenerate

Expected behavior (tell us what should happen)

Mining should start using the last specified value, or -1 (all cores) if no number has been previously specified. If the genproclimit-cpu argument needs to be specified, then the call should return an error message and the help documentation for the setgenerate command should be updated to reflect that the field is mandatory if the generate argument to true.

Actual behavior (tell us what happens instead)

I would expect the result of getgenerate to be true, but it shows as false.

Help documentation show that the genproclimit-cpu` argument is optional

setgenerate generate genproclimit (genproclimit-gpu)

Set 'generate' true or false to turn generation on or off.
Generation is limited to 'genproclimit' processors, -1 is unlimited.
See the getgenerate call for the current setting.

Arguments:
1. generate         (boolean, required) Set to true to turn on generation, false to turn off.
2. genproclimit-cpu (numeric, optional) Set the CPU thread limit for when generation is on. Can be -1 for unlimited.
3. genproclimit-gpu (numeric, optional) Set the GPU thread limit for when generation is on. Can be -1 for unlimited.

Examples:

Set the generation on with a limit of one CPU processor
> dynamic-cli setgenerate true 1

Check the setting
> dynamic-cli getgenerate

Turn off generation
> dynamic-cli setgenerate false

Using json rpc
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setgenerate", "params": [true, 1] }' -H 'content-type: text/plain;' http://127.0.0.1:51954/

What platform are you using (Linux, Windows, Mac)

Ubuntu 18.04 running Dynamic v2.4.4.1

@LordDarkHelmet
Copy link
Contributor Author

LordDarkHelmet commented Jul 21, 2021

In addition, using dynamic-cli setgenerate false does not turn off mining. If you are CPU mining, then you must set genproclimit-cpu to 0 to stop mining. I would expect to see all mining turned off if the generate argument is set to false, but this is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant