Add details for MnSync RPC (Dash section)

This commit is contained in:
thephez 2017-10-10 16:10:16 -04:00
parent b313dcad00
commit d27e4a917a
2 changed files with 146 additions and 3 deletions

View file

@ -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<br>(exactly 1)"
d: "The command mode to use:<br>`status` - Get masternode sync status<br>`next` - Move to next sync asset<br>`reset` - Reset sync status"
{% enditemplate %}
**Command Mode - Status**
*Result---the sync status*
{% itemplate ntpd1 %}
- n: "`result`"
t: "object/null"
p: "Required<br>(exactly 1)"
d: "Information about the masternode sync status"
- n: "→<br>`AssetID`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The sync asset ID"
- n: "→<br>`AssetName`"
t: "string"
p: "Required<br>(exactly 1)"
d: "The sync asset name"
- n: "→<br>`AssetStartTime`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The sync asset start time"
- n: "→<br>`Attempt`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The sync attempt number"
- n: "→<br>`IsBlockchainSynced`"
t: "boolean"
p: "Required<br>(exactly 1)"
d: "Blockchain sync status"
- n: "→<br>`IsMasternodeListSynced`"
t: "boolean"
p: "Required<br>(exactly 1)"
d: "Masternode list sync status"
- n: "→<br>`IsWinnersListSynced`"
t: "boolean"
p: "Required<br>(exactly 1)"
d: "Masternode winners list sync status"
- n: "→<br>`IsSynced`"
t: "boolean"
p: "Required<br>(exactly 1)"
d: "Masternode sync status"
- n: "→<br>`IsFailed`"
t: "boolean"
p: "Required<br>(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<br>(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<br>(exactly 1)"
d: "Command return status:<br>`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 %}