RPC - Add disconnectnode nodeid parameter

This commit is contained in:
thephez 2019-08-19 15:44:31 -04:00
parent 3ff15f3d4f
commit 643605c79f
3 changed files with 20 additions and 4 deletions

View file

@ -222,7 +222,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
* [AddNode][rpc addnode]: {{summary_addNode}} {{UPDATED0_14_0}}
* [ClearBanned][rpc clearbanned]: {{summary_clearBanned}} {{NEW0_12_0}}
* [DisconnectNode][rpc disconnectnode]: {{summary_disconnectNode}} {{NEW0_12_0}} {{UPDATED0_14_1}}
* [DisconnectNode][rpc disconnectnode]: {{summary_disconnectNode}} {{DASH_UPDATED0_14_1}} {{UPDATED0_14_1}}
* [GetAddedNodeInfo][rpc getaddednodeinfo]: {{summary_getAddedNodeInfo}} {{DASH_UPDATED0_12_3}} {{UPDATED0_14_0}}
* [GetConnectionCount][rpc getconnectioncount]: {{summary_getConnectionCount}}
* [GetNetTotals][rpc getnettotals]: {{summary_getNetTotals}} {{UPDATED0_12_0}}

View file

@ -22,7 +22,15 @@ The `disconnectnode` RPC {{summary_disconnectNode}}
t: "string"
p: "Required<br>(exactly 1)"
d: "The node you want to disconnect from as a string in the form of `<IP address>:<port>`.<br><br>*Updated in Bitcoin Core 0.14.1*"
{% enditemplate %}
*Parameter #2---nodeid*
{% itemplate ntpd1 %}
- n: "nodeid"
t: "number"
p: "Optional"
d: "The node ID (see `getpeerinfo` for node IDs)"
{% enditemplate %}
*Result---`null` on success or error on failed disconnect*
@ -35,9 +43,9 @@ The `disconnectnode` RPC {{summary_disconnectNode}}
{% enditemplate %}
*Example from Dash Core 0.12.2*
*Example from Dash Core 0.14.1*
Disconnects following node from your node.
Disconnects following node by address.
{% highlight bash %}
dash-cli -testnet disconnectnode 192.0.2.113:19999
@ -45,6 +53,14 @@ dash-cli -testnet disconnectnode 192.0.2.113:19999
Result (no output from `dash-cli` because result is set to `null`).
Disconnects following node by id.
{% highlight bash %}
dash-cli -testnet disconnectnode "" 3
{% endhighlight %}
Result (no output from `dash-cli` because result is set to `null`).
*See also*
* [AddNode][rpc addnode]: {{summary_addNode}}