From 5011081fb59815c162ddf00e21608a2c815edbcd Mon Sep 17 00:00:00 2001 From: thephez Date: Tue, 10 Oct 2017 09:15:46 -0400 Subject: [PATCH] Add Debug RPC --- _autocrossref.yaml | 2 + _config.yml | 1 + _includes/devdoc/dash-core/rpcs/rpcs/debug.md | 38 +++++++++++++++++++ _includes/helpers/summaries.md | 3 +- _includes/references.md | 1 + en/developer-reference.md | 2 + 6 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 _includes/devdoc/dash-core/rpcs/rpcs/debug.md diff --git a/_autocrossref.yaml b/_autocrossref.yaml index f61eaa3b..d08da280 100644 --- a/_autocrossref.yaml +++ b/_autocrossref.yaml @@ -253,6 +253,8 @@ CVE-2012-2459: '`createmultisig` RPC': rpc createmultisig '`createrawtransaction`': rpc createrawtransaction '`createrawtransaction` RPC': rpc createrawtransaction +'`debug`': rpc debug +'`debug` RPC': rpc debug '`decoderawtransaction`': rpc decoderawtransaction '`decoderawtransaction` RPC': rpc decoderawtransaction '`decodescript`': rpc decodescript diff --git a/_config.yml b/_config.yml index 5dd35bdf..9b22f296 100644 --- a/_config.yml +++ b/_config.yml @@ -263,6 +263,7 @@ devsearches: - 'ClearBanned': "/en/developer-reference#clearbanned" - 'CreateMultisig': "/en/developer-reference#createmultisig" - 'CreateRawTransaction': "/en/developer-reference#createrawtransaction" + - 'Debug': "/en/developer-reference#debug" - 'DecodeRawTransaction': "/en/developer-reference#decoderawtransaction" - 'DecodeScript': "/en/developer-reference#decodescript" - 'DisconnectNode': "/en/developer-reference#disconnectnode" diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/debug.md b/_includes/devdoc/dash-core/rpcs/rpcs/debug.md new file mode 100644 index 00000000..674add3e --- /dev/null +++ b/_includes/devdoc/dash-core/rpcs/rpcs/debug.md @@ -0,0 +1,38 @@ +{% comment %} +This file is licensed under the MIT License (MIT) available on +http://opensource.org/licenses/MIT. +{% endcomment %} +{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/debug.md" %} + +##### Debug +{% include helpers/subhead-links.md %} + +{% assign summary_debug="changes the debug category from the console." %} + +{% autocrossref %} + +The `debug` RPC {{summary_debug}} + +*Parameter #1---debug category* + +{% itemplate ntpd1 %} +- n: "Debug category" + t: "string" + p: "Required
(1 or more)" + d: "The debug category to activate. Use a comma to specify multiple categories. Categories will be one of the following:
• `0` - Disables all categories
• `1` - Enables all categories
• `addrman`
• `alert`
• `bench`
• `coindb`
• `db`
• `lock`
• `rand`
• `rpc`
• `selectcoins`
• `mempool`
• `mempoolrej`
• `net`
• `proxy`
• `prune`
• `http`
• `libevent`
• `tor`
• `zmq`
• `dash`
• `privatesend`
• `instantsend`
• `masternode`
• `spork`
• `keepass`
• `mnpayments`
• `gobject`
" + +{% enditemplate %} + +{% highlight bash %} +dash-cli -testnet debug "net,mempool" +{% endhighlight %} + +Result: + +{% highlight text %} +Debug mode: net,mempool +{% endhighlight %} + +*See also: none* + +{% endautocrossref %} diff --git a/_includes/helpers/summaries.md b/_includes/helpers/summaries.md index 7c36c592..ce7c722b 100644 --- a/_includes/helpers/summaries.md +++ b/_includes/helpers/summaries.md @@ -9,6 +9,7 @@ This file is licensed under the terms of its source texts{%endcomment%} {% assign summary_clearBanned="clears list of banned nodes." %} {% assign summary_createMultiSig="creates a P2SH multi-signature address." %} {% assign summary_createRawTransaction="creates an unsigned serialized transaction that spends a previous output to a new output with a P2PKH or P2SH address. The transaction is not stored in the wallet or transmitted to the network." %} +{% assign summary_debug="changes the debug category from the console." %} {% assign summary_decodeRawTransaction="decodes a serialized transaction hex string into a JSON object describing the transaction." %} {% assign summary_decodeScript="decodes a hex-encoded P2SH redeem script." %} {% assign summary_disconnectNode="immediately disconnects from a specified node." %} @@ -112,7 +113,7 @@ This file is licensed under the terms of its source texts{%endcomment%} {% assign summary_signMessage="signs a message with the private key of an address." %} {% assign summary_signMessageWithPrivKey="signs a message with a given private key." %} {% assign summary_signRawTransaction="signs a transaction in the serialized transaction format using private keys stored in the wallet or provided in the call." %} -{% assign summary_stop="safely shuts down the Bitcoin Core server." %} +{% assign summary_stop="safely shuts down the Dash Core server." %} {% assign summary_submitBlock="accepts a block, verifies it is a valid addition to the block chain, and broadcasts it to the network. Extra parameters are ignored by Bitcoin Core but may be used by mining pools or other programs." %} {% assign summary_validateAddress="returns information about the given Bitcoin address." %} {% assign summary_verifyChain="verifies each entry in the local block chain database." %} diff --git a/_includes/references.md b/_includes/references.md index 00cee105..7fd8175d 100644 --- a/_includes/references.md +++ b/_includes/references.md @@ -92,6 +92,7 @@ http://opensource.org/licenses/MIT. [rpc clearbanned]: /en/developer-reference#clearbanned [rpc createmultisig]: /en/developer-reference#createmultisig [rpc createrawtransaction]: /en/developer-reference#createrawtransaction +[rpc debug]: /en/developer-reference#debug [rpc decoderawtransaction]: /en/developer-reference#decoderawtransaction [rpc decodescript]: /en/developer-reference#decodescript [rpc disconnectnode]: /en/developer-reference#disconnectnode diff --git a/en/developer-reference.md b/en/developer-reference.md index 1e449a1f..284511fc 100644 --- a/en/developer-reference.md +++ b/en/developer-reference.md @@ -84,6 +84,8 @@ untrusted source. {% include devdoc/dash-core/rpcs/rpcs/createmultisig.md %} +{% include devdoc/dash-core/rpcs/rpcs/debug.md %} + {% include devdoc/dash-core/rpcs/rpcs/createrawtransaction.md %} {% include devdoc/dash-core/rpcs/rpcs/decoderawtransaction.md %}