mirror of
https://github.com/seigler/dash-docs
synced 2025-07-28 10:16:15 +00:00
Update Generating RPCs
- Added details back for GetGenerate/SetGenerate which were deprecated in Bitcoin
This commit is contained in:
parent
0c33d487a6
commit
252512bbf8
6 changed files with 101 additions and 35 deletions
|
@ -152,8 +152,8 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
* [Generate][rpc generate]: {{summary_generate}} {{NEW0_11_0}}, {{UPDATED0_13_0}}
|
* [Generate][rpc generate]: {{summary_generate}} {{NEW0_11_0}}, {{UPDATED0_13_0}}
|
||||||
* [GetGenerate][rpc getgenerate]: {{summary_getgenerate}}
|
* [GetGenerate][rpc getgenerate]: {{summary_getGenerate}}
|
||||||
* [SetGenerate][rpc setgenerate]: {{summary_setgenerate}}
|
* [SetGenerate][rpc setgenerate]: {{summary_setGenerate}}
|
||||||
* {{DASH_NOT_IMPLEMENTED}} [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}} {{NEW0_13_0}}
|
* {{DASH_NOT_IMPLEMENTED}} [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}} {{NEW0_13_0}}
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
|
@ -7,31 +7,21 @@ http://opensource.org/licenses/MIT.
|
||||||
##### Generate
|
##### Generate
|
||||||
{% include helpers/subhead-links.md %}
|
{% include helpers/subhead-links.md %}
|
||||||
|
|
||||||
{% assign summary_generate="nearly instantly generates blocks." %}
|
{% assign summary_generate="mines blocks immediately (before the RPC call returns)." %}
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
*Requires wallet support.*
|
*Requires wallet support. Can only be used on the regtest network.*
|
||||||
|
|
||||||
The `generate` RPC {{summary_generate}}
|
The `generate` RPC {{summary_generate}}
|
||||||
|
|
||||||
*Parameter #1---the number of blocks to generate*
|
*Parameter #1---the number of blocks to generate*
|
||||||
|
|
||||||
{% itemplate ntpd1 %}
|
{% itemplate ntpd1 %}
|
||||||
- n: "Blocks"
|
- n: "`numblocks`"
|
||||||
t: "number (int)"
|
t: "number (int)"
|
||||||
p: "Required<br>(exactly 1)"
|
p: "Required<br>(exactly 1)"
|
||||||
d: "The number of blocks to generate. The RPC call will not return until all blocks have been generated or the maxium number of iterations has been reached"
|
d: "The number of blocks to generate. The RPC call will not return until all blocks have been generated."
|
||||||
|
|
||||||
{% enditemplate %}
|
|
||||||
|
|
||||||
*Parameter #2---the maximum number of iterations to try*
|
|
||||||
|
|
||||||
{% itemplate ntpd1 %}
|
|
||||||
- n: "Maxtries"
|
|
||||||
t: "number (int)"
|
|
||||||
p: "Optional<br>(0 or 1)"
|
|
||||||
d: "The maximum number of iterations that are tried to create the requested number of blocks. Default is `1000000`"
|
|
||||||
|
|
||||||
{% enditemplate %}
|
{% enditemplate %}
|
||||||
|
|
||||||
|
@ -49,27 +39,29 @@ The `generate` RPC {{summary_generate}}
|
||||||
d: "The hashes of the headers of the blocks generated in regtest mode, as hex in RPC byte order"
|
d: "The hashes of the headers of the blocks generated in regtest mode, as hex in RPC byte order"
|
||||||
{% enditemplate %}
|
{% enditemplate %}
|
||||||
|
|
||||||
*Example from Bitcoin Core 0.13.1*
|
*Example from Dash Core 0.12.2*
|
||||||
|
|
||||||
Using regtest mode (also works in normal mode), generate 2 blocks:
|
Using regtest mode, generate 2 blocks:
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
bitcoin-cli -regtest generate 2 500000
|
dash-cli -regtest generate 2
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
Result:
|
Result:
|
||||||
|
|
||||||
{% highlight json %}
|
{% highlight json %}
|
||||||
[
|
[
|
||||||
"36252b5852a5921bdfca8701f936b39edeb1f8c39fffe73b0d8437921401f9af",
|
"55a4c47da8151c0823eec22c41ebc6d690a0288302179625bae9eb6f36808266",
|
||||||
"5f2956817db1e386759aa5794285977c70596b39ea093b9eab0aa4ba8cd50c06"
|
"3f07b9aa4e3bcd5518610945c4a6b32699acac71b1762605ff79ba553111fc79"
|
||||||
]
|
]
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
*See also*
|
*See also*
|
||||||
|
|
||||||
* [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}}
|
* [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}}
|
||||||
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}}
|
|
||||||
* [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}}
|
* [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}}
|
||||||
|
* [GetGenerate][rpc getgenerate]: {{summary_getGenerate}}
|
||||||
|
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}}
|
||||||
|
* [SetGenerate][rpc setgenerate]: {{summary_setGenerate}}
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
|
@ -13,6 +13,9 @@ http://opensource.org/licenses/MIT.
|
||||||
|
|
||||||
*Added in Bitcoin Core 0.13.0*
|
*Added in Bitcoin Core 0.13.0*
|
||||||
|
|
||||||
|
**_Not implemented in Dash Core (as of 0.12.2)_**
|
||||||
|
|
||||||
|
{% comment %}
|
||||||
*Requires wallet support.*
|
*Requires wallet support.*
|
||||||
|
|
||||||
The `generatetoaddress` RPC {{summary_generateToAddress}}
|
The `generatetoaddress` RPC {{summary_generateToAddress}}
|
||||||
|
@ -24,7 +27,7 @@ The `generatetoaddress` RPC {{summary_generateToAddress}}
|
||||||
t: "number (int)"
|
t: "number (int)"
|
||||||
p: "Required<br>(exactly 1)"
|
p: "Required<br>(exactly 1)"
|
||||||
d: "The number of blocks to generate. The RPC call will not return until all blocks have been generated or the maxium number of iterations has been reached"
|
d: "The number of blocks to generate. The RPC call will not return until all blocks have been generated or the maxium number of iterations has been reached"
|
||||||
|
|
||||||
{% enditemplate %}
|
{% enditemplate %}
|
||||||
|
|
||||||
*Parameter #2---a transaction identifier (TXID)*
|
*Parameter #2---a transaction identifier (TXID)*
|
||||||
|
@ -34,7 +37,7 @@ The `generatetoaddress` RPC {{summary_generateToAddress}}
|
||||||
t: "string (base58)"
|
t: "string (base58)"
|
||||||
p: "Required<br>(exactly 1)"
|
p: "Required<br>(exactly 1)"
|
||||||
d: "The address to send the newly generated Bitcoin to"
|
d: "The address to send the newly generated Bitcoin to"
|
||||||
|
|
||||||
{% enditemplate %}
|
{% enditemplate %}
|
||||||
|
|
||||||
*Parameter #3---the maximum number of iterations to try*
|
*Parameter #3---the maximum number of iterations to try*
|
||||||
|
@ -85,4 +88,6 @@ Result:
|
||||||
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}}
|
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}}
|
||||||
* [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}}
|
* [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}}
|
||||||
|
|
||||||
|
{% endcomment %}
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
|
@ -7,20 +7,45 @@ http://opensource.org/licenses/MIT.
|
||||||
##### GetGenerate
|
##### GetGenerate
|
||||||
{% include helpers/subhead-links.md %}
|
{% include helpers/subhead-links.md %}
|
||||||
|
|
||||||
{% assign summary_getGenerate="was removed in Bitcoin Core 0.13.0." %}
|
{% assign summary_getGenerate="returns if the server is set to generate coins or not." %}
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
*Requires wallet support.*
|
*Requires wallet support.*
|
||||||
|
|
||||||
The `getgenerate` RPC {{summary_getGenerate}} If you have an older
|
*Removed in Bitcoin Core 0.13.0.*
|
||||||
version of Bitcoin Core, use `help getgenerate` to get help.
|
|
||||||
|
The `getgenerate` RPC {{summary_getGenerate}}
|
||||||
|
|
||||||
|
*Parameters: none*
|
||||||
|
|
||||||
|
*Result---whether the server is set to generate blocks*
|
||||||
|
|
||||||
|
{% itemplate ntpd1 %}
|
||||||
|
- n: "`result`"
|
||||||
|
t: "bool"
|
||||||
|
p: "Required<br>(exactly 1)"
|
||||||
|
d: "Set to `true` if the server is set to generate blocks; set to `false` if it is not"
|
||||||
|
|
||||||
|
{% enditemplate %}
|
||||||
|
|
||||||
|
*Example from Dash Core 0.12.2*
|
||||||
|
|
||||||
|
{% highlight bash %}
|
||||||
|
dash-cli -regtest getgenerate
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
|
Result:
|
||||||
|
|
||||||
|
{% highlight json %}
|
||||||
|
false
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
*See also*
|
*See also*
|
||||||
|
|
||||||
* [Generate][rpc generate]: {{summary_generate}}
|
* [Generate][rpc generate]: {{summary_generate}}
|
||||||
* [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}}
|
* [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}}
|
||||||
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}}
|
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}}
|
||||||
|
* [SetGenerate][rpc setgenerate]: {{summary_setGenerate}}
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
|
@ -7,16 +7,58 @@ http://opensource.org/licenses/MIT.
|
||||||
##### SetGenerate
|
##### SetGenerate
|
||||||
{% include helpers/subhead-links.md %}
|
{% include helpers/subhead-links.md %}
|
||||||
|
|
||||||
{% assign summary_setGenerate="was removed in Bitcoin Core 0.13.0." %}
|
{% assign summary_setGenerate="enables or disables hashing to attempt to find the next block." %}
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
*Requires wallet support.*
|
*Requires wallet support.*
|
||||||
|
|
||||||
The `setgenerate` RPC {{summary_setGenerate}} If you have an older
|
*Removed in Bitcoin Core 0.13.0.*
|
||||||
version of Bitcoin Core, use `help setgenerate` RPC to get help. For testing,
|
|
||||||
the generate call can still be used to mine a block, and the `generatetoaddress` RPC
|
The `setgenerate` RPC {{summary_setGenerate}}
|
||||||
call has been added to mine to a specific address. This works with wallet disabled.
|
|
||||||
|
*Parameter #1---enable/disable generation*
|
||||||
|
|
||||||
|
{% itemplate ntpd1 %}
|
||||||
|
- n: "`generate`"
|
||||||
|
t: "boolean"
|
||||||
|
p: "Required<br>(exactly 1)"
|
||||||
|
d: "Set to true to turn on generation, false to turn off."
|
||||||
|
|
||||||
|
{% enditemplate %}
|
||||||
|
|
||||||
|
*Parameter #2---processor limit*
|
||||||
|
|
||||||
|
{% itemplate ntpd1 %}
|
||||||
|
- n: "`genproclimit`"
|
||||||
|
t: "number (int)"
|
||||||
|
p: "Optional<br>(exactly 1)"
|
||||||
|
d: "Set the processor limit for when generation is on. Can be -1 for unlimited."
|
||||||
|
|
||||||
|
{% enditemplate %}
|
||||||
|
|
||||||
|
|
||||||
|
*Result---the generated block header hashes*
|
||||||
|
|
||||||
|
{% itemplate ntpd1 %}
|
||||||
|
- n: "`result`"
|
||||||
|
t: "null"
|
||||||
|
p: "Required<br>(exactly 1)"
|
||||||
|
d: "Always JSON `null`"
|
||||||
|
|
||||||
|
{% enditemplate %}
|
||||||
|
|
||||||
|
*Example from Dash Core 0.12.2*
|
||||||
|
|
||||||
|
Using regtest mode, generate 2 blocks:
|
||||||
|
|
||||||
|
{% highlight bash %}
|
||||||
|
dash-cli -testnet setgenerate 1
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
|
Result:
|
||||||
|
|
||||||
|
(Success: no result displayed. Process manager shows 100% CPU usage.)
|
||||||
|
|
||||||
*See also*
|
*See also*
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
||||||
{% assign summary_estimatePriority="estimates the priority that a transaction needs in order to be included within a certain number of blocks as a free high-priority transaction." %}
|
{% assign summary_estimatePriority="estimates the priority that a transaction needs in order to be included within a certain number of blocks as a free high-priority transaction." %}
|
||||||
{% assign summary_fundRawTransaction="adds inputs to a transaction until it has enough in value to meet its out value." %}
|
{% assign summary_fundRawTransaction="adds inputs to a transaction until it has enough in value to meet its out value." %}
|
||||||
{% assign summary_generate="nearly instantly generates blocks." %}
|
{% assign summary_generate="nearly instantly generates blocks." %}
|
||||||
|
{% assign summary_generate="mines blocks immediately (before the RPC call returns)." %}
|
||||||
{% assign summary_generateToAddress="mines blocks immediately to a specified address." %}
|
{% assign summary_generateToAddress="mines blocks immediately to a specified address." %}
|
||||||
{% assign summary_getAccount="returns the name of the account associated with the given address." %}
|
{% assign summary_getAccount="returns the name of the account associated with the given address." %}
|
||||||
{% assign summary_getAccountAddress="returns the current Bitcoin address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address." %}
|
{% assign summary_getAccountAddress="returns the current Bitcoin address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address." %}
|
||||||
|
@ -43,7 +44,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
||||||
{% assign summary_getChainTips="returns information about the highest-height block (tip) of each local block chain." %}
|
{% assign summary_getChainTips="returns information about the highest-height block (tip) of each local block chain." %}
|
||||||
{% assign summary_getConnectionCount="returns the number of connections to other nodes." %}
|
{% assign summary_getConnectionCount="returns the number of connections to other nodes." %}
|
||||||
{% assign summary_getDifficultly="returns the proof-of-work difficulty as a multiple of the minimum difficulty." %}
|
{% assign summary_getDifficultly="returns the proof-of-work difficulty as a multiple of the minimum difficulty." %}
|
||||||
{% assign summary_getGenerate="was removed in Bitcoin Core 0.13.0." %}
|
{% assign summary_getGenerate="returns if the server is set to generate coins or not." %}
|
||||||
{% assign summary_getGovernanceInfo="returns an object containing governance parameters." %}
|
{% assign summary_getGovernanceInfo="returns an object containing governance parameters." %}
|
||||||
{% assign summary_getHashesPerSec="was removed in Bitcoin Core 0.11.0." %}
|
{% assign summary_getHashesPerSec="was removed in Bitcoin Core 0.11.0." %}
|
||||||
{% assign summary_getInfo="prints various information about the node and the network." %}
|
{% assign summary_getInfo="prints various information about the node and the network." %}
|
||||||
|
@ -96,6 +97,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
||||||
{% assign summary_ping-rpc="sends a P2P ping message to all connected nodes to measure ping time. Results are provided by the `getpeerinfo` RPC pingtime and pingwait fields as decimal seconds. The P2P `ping` message is handled in a queue with all other commands, so it measures processing backlog, not just network ping." %}
|
{% assign summary_ping-rpc="sends a P2P ping message to all connected nodes to measure ping time. Results are provided by the `getpeerinfo` RPC pingtime and pingwait fields as decimal seconds. The P2P `ping` message is handled in a queue with all other commands, so it measures processing backlog, not just network ping." %}
|
||||||
{% assign summary_preciousBlock="treats a block as if it were received before others with the same work." %}
|
{% assign summary_preciousBlock="treats a block as if it were received before others with the same work." %}
|
||||||
{% assign summary_prioritiseTransaction="adds virtual priority or fee to a transaction, allowing it to be accepted into blocks mined by this node (or miners which use this node) with a lower priority or fee. (It can also remove virtual priority or fee, requiring the transaction have a higher priority or fee to be accepted into a locally-mined block.)" %}
|
{% assign summary_prioritiseTransaction="adds virtual priority or fee to a transaction, allowing it to be accepted into blocks mined by this node (or miners which use this node) with a lower priority or fee. (It can also remove virtual priority or fee, requiring the transaction have a higher priority or fee to be accepted into a locally-mined block.)" %}
|
||||||
|
{% assign summary_privateSend="controls the mixing process." %}
|
||||||
{% assign summary_pruneBlockChain="prunes the blockchain up to a specified height or timestamp." %}
|
{% assign summary_pruneBlockChain="prunes the blockchain up to a specified height or timestamp." %}
|
||||||
{% assign summary_removePrunedFunds="deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds." %}
|
{% assign summary_removePrunedFunds="deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds." %}
|
||||||
{% assign summary_restGetBlock-noTxDetails="gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions [GET block][rest get block] returns." %}
|
{% assign summary_restGetBlock-noTxDetails="gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. The JSON object includes TXIDs for transactions within the block rather than the complete transactions [GET block][rest get block] returns." %}
|
||||||
|
@ -112,7 +114,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
||||||
{% assign summary_sendToAddress="spends an amount to a given address." %}
|
{% assign summary_sendToAddress="spends an amount to a given address." %}
|
||||||
{% assign summary_setAccount="puts the specified address in the given account." %}
|
{% assign summary_setAccount="puts the specified address in the given account." %}
|
||||||
{% assign summary_setBan="attempts add or remove a IP/Subnet from the banned list." %}
|
{% assign summary_setBan="attempts add or remove a IP/Subnet from the banned list." %}
|
||||||
{% assign summary_setGenerate="was removed in Bitcoin Core 0.13.0." %}
|
{% assign summary_setGenerate="enables or disables hashing to attempt to find the next block." %}
|
||||||
{% assign summary_setNetworkActive="disables/enables all P2P network activity." %}
|
{% assign summary_setNetworkActive="disables/enables all P2P network activity." %}
|
||||||
{% assign summary_setTxFee="sets the transaction fee per kilobyte paid by transactions created by this wallet." %}
|
{% assign summary_setTxFee="sets the transaction fee per kilobyte paid by transactions created by this wallet." %}
|
||||||
{% assign summary_signMessage="signs a message with the private key of an address." %}
|
{% assign summary_signMessage="signs a message with the private key of an address." %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue