diff --git a/_includes/devdoc/dash-core/rpcs/quick-reference.md b/_includes/devdoc/dash-core/rpcs/quick-reference.md index 8e301dcc..19114f6d 100644 --- a/_includes/devdoc/dash-core/rpcs/quick-reference.md +++ b/_includes/devdoc/dash-core/rpcs/quick-reference.md @@ -152,8 +152,8 @@ These RPCs are all Dash-specific and not found in Bitcoin Core {% autocrossref %} * [Generate][rpc generate]: {{summary_generate}} {{NEW0_11_0}}, {{UPDATED0_13_0}} - * [GetGenerate][rpc getgenerate]: {{summary_getgenerate}} - * [SetGenerate][rpc setgenerate]: {{summary_setgenerate}} +* [GetGenerate][rpc getgenerate]: {{summary_getGenerate}} +* [SetGenerate][rpc setgenerate]: {{summary_setGenerate}} * {{DASH_NOT_IMPLEMENTED}} [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}} {{NEW0_13_0}} {% endautocrossref %} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/generate.md b/_includes/devdoc/dash-core/rpcs/rpcs/generate.md index 2512ba08..b9291881 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/generate.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/generate.md @@ -7,31 +7,21 @@ http://opensource.org/licenses/MIT. ##### Generate {% include helpers/subhead-links.md %} -{% assign summary_generate="nearly instantly generates blocks." %} +{% assign summary_generate="mines blocks immediately (before the RPC call returns)." %} {% autocrossref %} -*Requires wallet support.* +*Requires wallet support. Can only be used on the regtest network.* The `generate` RPC {{summary_generate}} *Parameter #1---the number of blocks to generate* {% itemplate ntpd1 %} -- n: "Blocks" +- n: "`numblocks`" t: "number (int)" p: "Required
(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" - -{% enditemplate %} - -*Parameter #2---the maximum number of iterations to try* - -{% itemplate ntpd1 %} -- n: "Maxtries" - t: "number (int)" - p: "Optional
(0 or 1)" - d: "The maximum number of iterations that are tried to create the requested number of blocks. Default is `1000000`" + d: "The number of blocks to generate. The RPC call will not return until all blocks have been generated." {% 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" {% 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 %} -bitcoin-cli -regtest generate 2 500000 +dash-cli -regtest generate 2 {% endhighlight %} Result: {% highlight json %} [ - "36252b5852a5921bdfca8701f936b39edeb1f8c39fffe73b0d8437921401f9af", - "5f2956817db1e386759aa5794285977c70596b39ea093b9eab0aa4ba8cd50c06" + "55a4c47da8151c0823eec22c41ebc6d690a0288302179625bae9eb6f36808266", + "3f07b9aa4e3bcd5518610945c4a6b32699acac71b1762605ff79ba553111fc79" ] {% endhighlight %} *See also* * [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}} -* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}} * [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}} +* [GetGenerate][rpc getgenerate]: {{summary_getGenerate}} +* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}} +* [SetGenerate][rpc setgenerate]: {{summary_setGenerate}} {% endautocrossref %} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/generatetoaddress.md b/_includes/devdoc/dash-core/rpcs/rpcs/generatetoaddress.md index 0f8cd2ae..9375c9fb 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/generatetoaddress.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/generatetoaddress.md @@ -13,6 +13,9 @@ http://opensource.org/licenses/MIT. *Added in Bitcoin Core 0.13.0* +**_Not implemented in Dash Core (as of 0.12.2)_** + +{% comment %} *Requires wallet support.* The `generatetoaddress` RPC {{summary_generateToAddress}} @@ -24,7 +27,7 @@ The `generatetoaddress` RPC {{summary_generateToAddress}} t: "number (int)" p: "Required
(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" - + {% enditemplate %} *Parameter #2---a transaction identifier (TXID)* @@ -34,7 +37,7 @@ The `generatetoaddress` RPC {{summary_generateToAddress}} t: "string (base58)" p: "Required
(exactly 1)" d: "The address to send the newly generated Bitcoin to" - + {% enditemplate %} *Parameter #3---the maximum number of iterations to try* @@ -85,4 +88,6 @@ Result: * [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}} * [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}} +{% endcomment %} + {% endautocrossref %} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/getgenerate.md b/_includes/devdoc/dash-core/rpcs/rpcs/getgenerate.md index 054c4586..7692a574 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/getgenerate.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/getgenerate.md @@ -7,20 +7,45 @@ http://opensource.org/licenses/MIT. ##### GetGenerate {% 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 %} *Requires wallet support.* -The `getgenerate` RPC {{summary_getGenerate}} If you have an older -version of Bitcoin Core, use `help getgenerate` to get help. +*Removed in Bitcoin Core 0.13.0.* + +The `getgenerate` RPC {{summary_getGenerate}} + +*Parameters: none* + +*Result---whether the server is set to generate blocks* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "bool" + p: "Required
(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* * [Generate][rpc generate]: {{summary_generate}} * [GenerateToAddress][rpc generatetoaddress]: {{summary_generateToAddress}} * [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}} - +* [SetGenerate][rpc setgenerate]: {{summary_setGenerate}} {% endautocrossref %} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/setgenerate.md b/_includes/devdoc/dash-core/rpcs/rpcs/setgenerate.md index 518b7d6d..2434e052 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/setgenerate.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/setgenerate.md @@ -7,16 +7,58 @@ http://opensource.org/licenses/MIT. ##### SetGenerate {% 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 %} *Requires wallet support.* -The `setgenerate` RPC {{summary_setGenerate}} If you have an older -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 -call has been added to mine to a specific address. This works with wallet disabled. +*Removed in Bitcoin Core 0.13.0.* + +The `setgenerate` RPC {{summary_setGenerate}} + +*Parameter #1---enable/disable generation* + +{% itemplate ntpd1 %} +- n: "`generate`" + t: "boolean" + p: "Required
(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
(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
(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* diff --git a/_includes/helpers/summaries.md b/_includes/helpers/summaries.md index d18c10c9..17e719f0 100644 --- a/_includes/helpers/summaries.md +++ b/_includes/helpers/summaries.md @@ -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_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="mines blocks immediately (before the RPC call returns)." %} {% 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_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_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_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_getHashesPerSec="was removed in Bitcoin Core 0.11.0." %} {% 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_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_privateSend="controls the mixing process." %} {% 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_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_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_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_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." %}