From d27e4a917a439566177356863039eb12fcde6d17 Mon Sep 17 00:00:00 2001 From: thephez Date: Tue, 10 Oct 2017 16:10:16 -0400 Subject: [PATCH] Add details for MnSync RPC (Dash section) --- .../devdoc/dash-core/rpcs/rpcs/mnsync.md | 148 +++++++++++++++++- _includes/helpers/summaries.md | 1 + 2 files changed, 146 insertions(+), 3 deletions(-) diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/mnsync.md b/_includes/devdoc/dash-core/rpcs/rpcs/mnsync.md index c09d8c8b..46e01868 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/mnsync.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/mnsync.md @@ -7,21 +7,163 @@ http://opensource.org/licenses/MIT. ##### MnSync {% include helpers/subhead-links.md %} -{% assign summary_mnSync="" %} +{% assign summary_mnSync="returns the sync status, updates to the next step or resets it entirely." %} {% autocrossref %} The `mnsync` RPC {{summary_mnSync}} +*Parameter #1---Command mode* + +{% itemplate ntpd1 %} +- n: "`mode`" + t: "string" + p: "Required
(exactly 1)" + d: "The command mode to use:
`status` - Get masternode sync status
`next` - Move to next sync asset
`reset` - Reset sync status" + +{% enditemplate %} + +**Command Mode - Status** + +*Result---the sync status* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "object/null" + p: "Required
(exactly 1)" + d: "Information about the masternode sync status" + +- n: "→
`AssetID`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The sync asset ID" + +- n: "→
`AssetName`" + t: "string" + p: "Required
(exactly 1)" + d: "The sync asset name" + +- n: "→
`AssetStartTime`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The sync asset start time" + +- n: "→
`Attempt`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The sync attempt number" + +- n: "→
`IsBlockchainSynced`" + t: "boolean" + p: "Required
(exactly 1)" + d: "Blockchain sync status" + +- n: "→
`IsMasternodeListSynced`" + t: "boolean" + p: "Required
(exactly 1)" + d: "Masternode list sync status" + +- n: "→
`IsWinnersListSynced`" + t: "boolean" + p: "Required
(exactly 1)" + d: "Masternode winners list sync status" + +- n: "→
`IsSynced`" + t: "boolean" + p: "Required
(exactly 1)" + d: "Masternode sync status" + +- n: "→
`IsFailed`" + t: "boolean" + p: "Required
(exactly 1)" + d: "Masternode list sync fail status" +{% enditemplate %} + +Sync Assets + +AssetID | AssetName +--- | --- | --- | +0 | MASTERNODE_SYNC_INITIAL +1 | MASTERNODE_SYNC_WAITING +2 | MASTERNODE_SYNC_LIST +3 | MASTERNODE_SYNC_MNW +4 | MASTERNODE_SYNC_GOVERNANCE +-1 | MASTERNODE_SYNC_FAILED +999 | MASTERNODE_SYNC_FINISHED + +*Example from Dash Core 0.12.2* + +Get Masternode sync status + {% highlight bash %} -dash-cli -testnet mnsync +dash-cli -testnet mnsync status {% endhighlight %} Result: {% highlight json %} - *INSERT RESULTS HERE* +{ + "AssetID": 999, + "AssetName": "MASTERNODE_SYNC_FINISHED", + "AssetStartTime": 1507662300, + "Attempt": 0, + "IsBlockchainSynced": true, + "IsMasternodeListSynced": true, + "IsWinnersListSynced": true, + "IsSynced": true, + "IsFailed": false +} +{% endhighlight %} + + +**Command Mode - Next** + +*Result---next command return status* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "string" + p: "Required
(exactly 1)" + d: "Command return status" +{% enditemplate %} + +*Example from Dash Core 0.12.2* + +{% highlight bash %} +dash-cli -testnet mnsync next +{% endhighlight %} + +Result: +{% highlight text %} +sync updated to MASTERNODE_SYNC_LIST +{% endhighlight %} + + +**Command Mode - Reset** + +*Result---reset command return status* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "string" + p: "Required
(exactly 1)" + d: "Command return status:
`success` or `failure`" +{% enditemplate %} + +*Example from Dash Core 0.12.2* + +{% highlight bash %} +dash-cli -testnet mnsync reset +{% endhighlight %} + +Result: +{% highlight text %} +success {% endhighlight %} *See also:* +* [Masternode][rpc masternode]: {{summary_masternode}} +* [MasternodeBroadcast][rpc masternodebroadcast]: {{summary_masternodeBroadcast}} +* [MasternodeList][rpc masternodelist]: {{summary_masternodeList}} + {% endautocrossref %} diff --git a/_includes/helpers/summaries.md b/_includes/helpers/summaries.md index 91548017..d18c10c9 100644 --- a/_includes/helpers/summaries.md +++ b/_includes/helpers/summaries.md @@ -91,6 +91,7 @@ This file is licensed under the terms of its source texts{%endcomment%} {% assign summary_listUnspent="returns an array of unspent transaction outputs belonging to this wallet." %} {% assign summary_lockUnspent="temporarily locks or unlocks specified transaction outputs. A locked transaction output will not be chosen by automatic coin selection when spending bitcoins. Locks are stored in memory only, so nodes start with zero locked outputs and the locked output list is always cleared when a node stops or fails." %} {% assign summary_masternodeList="returns a list of masternodes in different modes." %} +{% assign summary_mnSync="returns the sync status, updates to the next step or resets it entirely." %} {% assign summary_move="moves a specified amount from one account in your wallet to another using an off-block-chain transaction." %} {% 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." %}