From 24461fec67c5f9c67177c84b56ff9077e64de3ef Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 20 Nov 2017 16:54:42 -0500 Subject: [PATCH] RPC update - spork details --- _includes/devdoc/dash-core/rpcs/rpcs/spork.md | 134 +++++++++++++++++- 1 file changed, 130 insertions(+), 4 deletions(-) diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/spork.md b/_includes/devdoc/dash-core/rpcs/rpcs/spork.md index 2a8d6939..9655872f 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/spork.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/spork.md @@ -7,21 +7,147 @@ http://opensource.org/licenses/MIT. ##### Spork {#spork-rpc} {% include helpers/subhead-links.md %} -{% assign summary_spork-rpc="" %} + + +{% assign summary_spork-rpc="reads or updates spork settings on the network." %} {% autocrossref %} The `spork` RPC {{summary_spork-rpc}} +To display the status of sporks, use the `show` or `active` syntax. + +*Parameter #1---Command mode* + +{% itemplate ntpd1 %} +- n: "`mode`" + t: "string" + p: "Required
(exactly 1)" + d: "The command mode to use:
`show` - Display spork values
`active` - Display spork activation status" + +{% enditemplate %} + +**Command Mode - `show`** + +*Result---spork values* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "object" + p: "Required
(exactly 1)" + d: "Object containing status" + +- n: "→
`Spork Value`" + t: "int64_t" + p: "Required
(1 or more)" + d: "Spork value" + +{% enditemplate %} + +*Example from Dash Core 0.12.2* + {% highlight bash %} -dash-cli -testnet spork +dash-cli -testnet spork show {% endhighlight %} Result: {% highlight json %} - *INSERT RESULTS HERE* +{ + "SPORK_2_INSTANTSEND_ENABLED": 0, + "SPORK_3_INSTANTSEND_BLOCK_FILTERING": 0, + "SPORK_5_INSTANTSEND_MAX_VALUE": 1000, + "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT": 0, + "SPORK_9_SUPERBLOCKS_ENABLED": 0, + "SPORK_10_MASTERNODE_PAY_UPDATED_NODES": 0, + "SPORK_12_RECONSIDER_BLOCKS": 0, + "SPORK_13_OLD_SUPERBLOCK_FLAG": 4070908800, + "SPORK_14_REQUIRE_SENTINEL_FLAG": 0 +} {% endhighlight %} -*See also:* +**Command Mode - `active`** + +*Result---spork active status* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "object" + p: "Required
(exactly 1)" + d: "Object containing status" + +- n: "→
`Spork Activation Status`" + t: "bool" + p: "Required
(1 or more)" + d: "Spork activation status" + +{% enditemplate %} + +*Example from Dash Core 0.12.2* + +{% highlight bash %} +dash-cli -testnet spork active +{% endhighlight %} + +Result: +{% highlight json %} +{ + "SPORK_2_INSTANTSEND_ENABLED": true, + "SPORK_3_INSTANTSEND_BLOCK_FILTERING": true, + "SPORK_5_INSTANTSEND_MAX_VALUE": true, + "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT": true, + "SPORK_9_SUPERBLOCKS_ENABLED": true, + "SPORK_10_MASTERNODE_PAY_UPDATED_NODES": true, + "SPORK_12_RECONSIDER_BLOCKS": true, + "SPORK_13_OLD_SUPERBLOCK_FLAG": false, + "SPORK_14_REQUIRE_SENTINEL_FLAG": true +} +{% endhighlight %} + + +To update the state of a spork activation, use the ` [value]` syntax. + +**Command Mode - `update`** + +*Parameter #1---Spork name* + +{% itemplate ntpd1 %} +- n: "`name`" + t: "string" + p: "Required
(exactly 1)" + d: "The name of the spork to update" + +{% enditemplate %} + +*Parameter #2---Spork value* + +{% itemplate ntpd1 %} +- n: "`value`" + t: "int" + p: "Required
(exactly 1)" + d: "The value to assign the spork" + +{% enditemplate %} + +*Result---spork update status* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "object" + p: "Required
(exactly 1)" + d: "Update status (`success` or `failure`)" +{% enditemplate %} + +*Example from Dash Core 0.12.2* + +{% highlight bash %} +dash-cli -testnet spork SPORK_2_INSTANTSEND_ENABLED 0 +{% endhighlight %} + +Result: +{% highlight bash %} +failure +{% endhighlight %} + +*See also: none* {% endautocrossref %}