The getgenerate method returns a boolean value indicating the server's mining status.
The default value is false.
::: tip See also gen. :::
Arguments
Name
Type
Description
(none)
(none)
Response
Name
Type
Description
true/false
(boolean)
indicates whether the server is set to generate coins
📌 Examples
Command:
<collapse-text hidden title="Response">
</collapse-text>
You can find your rpcuser, rpcpassword, and rpcport in the coin's .conf file.
Command:
<collapse-text hidden title="Response">
</collapse-text>
setgenerate
setgenerate generate ( genproclimit )
The setgenerate method allows the user to set the generate property in the coin daemon to true or false, thus turning generation (mining/staking) on or off.
Generation is limited to genproclimit processors. Set genproclimit to -1 to use maximum available processors.
::: tip See also the getgenerate method to query the current setting, and genproclimit for setting the default number of processors the daemon uses through the .conf file. :::
Arguments
Name
Type
Description
generate
(boolean, required)
set to true to turn on generation; set to off to turn off generation
genproclimit
(numeric, optional)
set the processor limit for when generation is on; use value "-1" for unlimited