Skip to content

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

@LordDarkHelmet

Description

@LordDarkHelmet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions