Update most existing Network RPCs

- AddNode, ClearBanned, DisconnectNode, GetAddedNodeInfo,
GetConnectionCount, GetNetTotals,GetNetworkInfo, GetPeerInfo,
ListBanned, Ping, SetBan
 - Added some norefs as needed (Network RPCs only)
This commit is contained in:
thephez 2017-10-12 12:21:23 -04:00
parent 1038093539
commit 02391ec648
11 changed files with 176 additions and 149 deletions

View file

@ -16,17 +16,17 @@ The `addnode` RPC {{summary_addNode}}
*Parameter #1---hostname/IP address and port of node to add or remove*
{% itemplate ntpd1 %}
- n: "Node"
- n: "`node`"
t: "string"
p: "Required<br>(exactly 1)"
d: "The node to add as a string in the form of `<IP address>:<port>`. The IP address may be a hostname resolvable through DNS, an IPv4 address, an IPv4-as-IPv6 address, or an IPv6 address"
d: "The node to add as a string in the form of `<IP address>:<port>`."
{% enditemplate %}
*Parameter #2---whether to add or remove the node, or to try only once to connect*
{% itemplate ntpd1 %}
- n: "Command"
- n: "`command`"
t: "string"
p: "Required<br>(exactly 1)"
d: "What to do with the IP address above. Options are:<br>`add` to add a node to the addnode list. Up to 8 nodes can be added additional to the default 8 nodes. Not limited by `-maxconnections`<br>`remove` to remove a node from the list. If currently connected, this will disconnect immediately<br>`onetry` to immediately attempt connection to the node even if the outgoing connection slots are full; this will only attempt the connection once"
@ -39,19 +39,19 @@ The `addnode` RPC {{summary_addNode}}
- n: "`result`"
t: "null"
p: "Required<br>(exactly 1)"
d: "Always JSON `null` whether the node was added, removed, tried-and-connected, or tried-and-not-connected. The JSON-RPC error field will be set only if you try removing a node that is not on the addnodes list"
d: "Always JSON `null` whether the node was added, removed, tried-and-connected, or tried-and-not-connected. The JSON-RPC error field will be set only if you try adding a node that was already added or removing a node that is not on the addnodes list"
{% enditemplate %}
*Example from Bitcoin Core 0.10.0*
*Example from Dash Core 0.12.2*
Try connecting to the following node.
{% highlight bash %}
bitcoin-cli -testnet addnode 192.0.2.113:18333 onetry
dash-cli -testnet addnode 192.0.2.113:19999 onetry
{% endhighlight %}
Result (no output from `bitcoin-cli` because result is set to `null`).
Result (no output from `dash-cli` because result is set to `null`).
*See also*

View file

@ -27,15 +27,15 @@ The `clearbanned` RPC {{summary_clearBanned}}
{% enditemplate %}
*Example from Bitcoin Core 0.13.1*
*Example from Dash Core 0.12.2*
Clears the ban list.
{% highlight bash %}
bitcoin-cli clearbanned
dash-cli clearbanned
{% endhighlight %}
Result (no output from `bitcoin-cli` because result is set to `null`).
Result (no output from `dash-cli` because result is set to `null`).
*See also*

View file

@ -18,10 +18,10 @@ The `disconnectnode` RPC {{summary_disconnectNode}}
*Parameter #1---hostname/IP address and port of node to disconnect*
{% itemplate ntpd1 %}
- n: "Address"
- n: "`node`"
t: "string"
p: "Required<br>(exactly 1)"
d: "*Updated in Bitcoin Core 0.14.1*<br><br>The node you want to disconnect from as a string in the form of `<IP address>:<port>`. The IP address may be a hostname resolvable through DNS, an IPv4 address, an IPv4-as-IPv6 address, or an IPv6 address"
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 %}
@ -35,15 +35,15 @@ The `disconnectnode` RPC {{summary_disconnectNode}}
{% enditemplate %}
*Example from Bitcoin Core 0.14.1*
*Example from Dash Core 0.12.2*
Disconnects following node from your node.
{% highlight bash %}
bitcoin-cli -testnet disconnectnode 192.0.2.113:18333
dash-cli -testnet disconnectnode 192.0.2.113:19999
{% endhighlight %}
Result (no output from `bitcoin-cli` because result is set to `null`).
Result (no output from `dash-cli` because result is set to `null`).
*See also*

View file

@ -16,17 +16,17 @@ The `getaddednodeinfo` RPC {{summary_getAddedNodeInfo}}
*Parameter #1---whether to display connection information*
{% itemplate ntpd1 %}
- n: "Details"
- n: "Dummy"
t: "bool"
p: "Required<br>(exactly 1)"
d: "*Removed in Bitcoin Core 0.14.0*<br><br>Set to `true` to display detailed information about each added node; set to `false` to only display the IP address or hostname and port added"
d: "Kept for historical purposes but ignored<br><br>*Removed in Bitcoin Core 0.14.0*"
{% enditemplate %}
*Parameter #2---what node to display information about*
{% itemplate ntpd1 %}
- n: "Node"
- n: "`node`"
t: "string"
p: "Optional<br>(0 or 1)"
d: "The node to get information about in the same `<IP address>:<port>` format as the `addnode` RPC. If this parameter is not provided, information about all added nodes will be returned"
@ -41,7 +41,7 @@ The `getaddednodeinfo` RPC {{summary_getAddedNodeInfo}}
p: "Required<br>(exactly 1)"
d: "An array containing objects describing each added node. If no added nodes are present, the array will be empty. Nodes added with `onetry` will not be returned"
- n: "→<br>Added Node"
- n: "→<br>Added Node<!--noref-->"
t: "object"
p: "Optional<br>(0 or more)"
d: "An object containing details about a single added node"
@ -49,22 +49,22 @@ The `getaddednodeinfo` RPC {{summary_getAddedNodeInfo}}
- n: "→ →<br>`addednode`"
t: "string"
p: "Required<br>(exactly 1)"
d: "An added node in the same `<IP address>:<port>` format as used in the `addnode` RPC. This element is present for any added node whether or not the Details parameter was set to `true`"
d: "An added node in the same `<IP address>:<port>` format as used in the `addnode` RPC."
- n: "→ →<br>`connected`"
t: "bool"
p: "Optional<br>(0 or 1)"
d: "If the Details parameter was set to `true`, this will be set to `true` if the node is currently connected and `false` if it is not"
d: "This will be set to `true` if the node is currently connected and `false` if it is not"
- n: "→ →<br>`addresses`"
t: "array"
p: "Optional<br>(0 or 1)"
d: "If the Details parameter was set to `true`, this will be an array of addresses belonging to the added node"
p: "Requred<br>(exactly 1)"
d: "This will be an array of addresses<!--noref--> belonging to the added node"
- n: "→ → →<br>Address"
- n: "→ → →<br>Address<!--noref-->"
t: "object"
p: "Optional<br>(0 or more)"
d: "An object describing one of this node's addresses"
d: "An object describing one of this node's addresses<!--noref-->"
- n: "→ → → →<br>`address`"
t: "string"
@ -78,26 +78,26 @@ The `getaddednodeinfo` RPC {{summary_getAddedNodeInfo}}
{% enditemplate %}
*Example from Bitcoin Core 0.14.1*
*Example from Dash Core 0.12.2*
{% highlight bash %}
bitcoin-cli getaddednodeinfo
dash-cli getaddednodeinfo true
{% endhighlight %}
Result (real hostname and IP address replaced):
Result (real hostname and IP address replaced with [RFC5737][] reserved address):
{% highlight json %}
[
{
"addednode" : "bitcoind.example.com:8333",
"connected" : true,
"addresses" : [
{
"address" : "192.0.2.113:8333",
"connected" : "outbound"
}
]
}
{
"addednode": "192.0.2.113:19999",
"connected": true,
"addresses": [
{
"address": "192.0.2.113:19999",
"connected": "outbound"
}
]
}
]
{% endhighlight %}

View file

@ -25,10 +25,10 @@ The `getconnectioncount` RPC {{summary_getConnectionCount}}
{% enditemplate %}
*Example from Bitcoin Core 0.10.0*
*Example from Dash Core 0.12.2*
{% highlight bash %}
bitcoin-cli -testnet getconnectioncount
dash-cli -testnet getconnectioncount
{% endhighlight bash %}
Result:

View file

@ -37,57 +37,57 @@ The `getnettotals` RPC {{summary_getNetTotals}}
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "Unix epoch time in milliseconds according to the operating system's clock (not the node adjusted time)"
- n: "→<br>`uploadtarget`"
t: "string : <br>object"
p: "Required<br>(exactly 1)"
d: "The upload traget information"
- n: "→ →<br>`timeframe`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "Length of the measuring timeframe in seconds. The timeframe is currently set to `24` hours"
d: "Length of the measuring timeframe in seconds (currently set to `24` hours)"
- n: "→ →<br>`target`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The maximum allowed outbound traffic in bytes. The default is `0`. Can be changed with `-maxuploadtarget`"
d: "The maximum allowed outbound traffic in bytes (default is `0`). Can be changed with `-maxuploadtarget`"
- n: "→ →<br>`target_reached`"
t: "bool"
p: "Required<br>(exactly 1)"
d: "Indicates if the target is reached. If the target is reached the node won't serve SPV and historical block requests anymore"
d: "Indicates if the target<!--noref--> is reached. If the target<!--noref--> is reached the node won't serve SPV and historical block requests anymore"
- n: "→ →<br>`serve_historical_blocks`"
t: "bool"
p: "Required<br>(exactly 1)"
d: "Indicates if historical blocks are served"
- n: "→ →<br>`bytes_left_in_cycle`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "Amount of bytes left in current time cycle. `0` is displayed if no upload target is set"
d: "Amount of bytes left in current time cycle. `0` is displayed if no upload target<!--noref--> is set"
- n: "→ →<br>`time_left_in_cycle`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "Seconds left in current time cycle. `0` is displayed if no upload target is set"
d: "Seconds left in current time cycle. `0` is displayed if no upload target<!--noref--> is set"
{% enditemplate %}
*Example from Bitcoin Core 0.13.1*
*Example from Dash Core 0.12.2*
{% highlight bash %}
bitcoin-cli getnettotals
dash-cli getnettotals
{% endhighlight %}
Result:
{% highlight json %}
{
"totalbytesrecv": 7137052851,
"totalbytessent": 211648636140,
"timemillis": 1481227418585,
"totalbytesrecv": 4661588,
"totalbytessent": 2899423,
"timemillis": 1507815162756,
"uploadtarget": {
"timeframe": 86400,
"target": 0,

View file

@ -26,7 +26,7 @@ The `getnetworkinfo` RPC {{summary_getNetworkInfo}}
- n: "→<br>`version`"
t: "number"
p: "Required<br>(exactly 1)"
d: "This node's version of Bitcoin Core in its internal integer format. For example, Bitcoin Core 0.9.2 has the integer version number 90200"
d: "This node's version of Dash Core in its internal integer format. For example, Dash Core 0.12.2 has the integer version number 120200"
- n: "→<br>`subversion`"
t: "string"
@ -37,12 +37,12 @@ The `getnetworkinfo` RPC {{summary_getNetworkInfo}}
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The protocol version number used by this node. See the [protocol versions section][section protocol versions] for more information"
- n: "→<br>`localservices`"
t: "string (hex)"
p: "Required<br>(exactly 1)"
d: "The services supported by this node as advertised in its `version` message"
- n: "→<br>`localrelay`"
t: "bool"
p: "Required<br>(exactly 1)"
@ -63,55 +63,55 @@ The `getnetworkinfo` RPC {{summary_getNetworkInfo}}
p: "Required<br>(exactly 1)"
d: "An array with three objects: one describing the IPv4 connection, one describing the IPv6 connection, and one describing the Tor hidden service (onion) connection"
- n: "→ →<br>Network"
- n: "→ →<br>Network<!--noref-->"
t: "object"
p: "Optional<br>(0 to 3)"
d: "An object describing a network. If the network is unroutable, it will not be returned"
d: "An object describing a network<!--noref-->. If the network<!--noref--> is unroutable, it will not be returned"
- n: "→ → →<br>`name`"
t: "string"
p: "Required<br>(exactly 1)"
d: "The name of the network. Either `ipv4`, `ipv6`, or `onion`"
d: "The name of the network<!--noref-->. Either `ipv4`, `ipv6`, or `onion`"
- n: "→ → →<br>`limited`"
t: "bool"
p: "Required<br>(exactly 1)"
d: "Set to `true` if only connections to this network are allowed according to the `-onlynet` Bitcoin Core command-line/configuration-file parameter. Otherwise set to `false`"
d: "Set to `true` if only connections to this network<!--noref--> are allowed according to the `-onlynet` Dash Core command-line/configuration-file parameter. Otherwise set to `false`"
- n: "→ → →<br>`reachable`"
t: "bool"
p: "Required<br>(exactly 1)"
d: "Set to `true` if connections can be made to or from this network. Otherwise set to `false`"
d: "Set to `true` if connections can be made to or from this network<!--noref-->. Otherwise set to `false`"
- n: "→ → →<br>`proxy`"
t: "string"
p: "Required<br>(exactly 1)"
d: "The hostname and port of any proxy being used for this network. If a proxy is not in use, an empty string"
d: "The hostname and port of any proxy being used for this network<!--noref-->. If a proxy is not in use, an empty string"
- n: "→ → →<br>`proxy_randomize_credentials`"
t: "bool"
p: "Required<br>(exactly 1)"
d: "*Added in Bitcoin Core 0.11.0*<br><br>Set to `true` if randomized credentials are set for this proxy. Otherwise set to `false`"
- n: "→<br>`relayfee`"
t: "number (bitcoins)"
t: "number (Dash)"
p: "Required<br>(exactly 1)"
d: "The minimum fee a low-priority transaction must pay in order for this node to accept it into its memory pool"
d: "The minimum relay fee for non-free transactions in order for this node to accept it into its memory pool"
- n: "→<br>`localaddresses`"
t: "array"
p: "Required<br>(exactly 1)"
d: "An array of objects each describing the local addresses this node believes it listens on"
d: "An array of objects each describing the local addresses<!--noref--> this node believes it listens on"
- n: "→ →<br>Address"
- n: "→ →<br>Address<!--noref-->"
t: "object"
p: "Optional<br>(0 or more)"
d: "An object describing a particular address this node believes it listens on"
d: "An object describing a particular address<!--noref--> this node believes it listens on"
- n: "→ → →<br>`address`"
t: "string"
p: "Required<br>(exactly 1)"
d: "An IP address or .onion address this node believes it listens on. This may be manually configured, auto detected, or based on `version` messages this node received from its peers"
d: "An IP address or .onion address<!--noref--> this node believes it listens on. This may be manually configured, auto detected, or based on `version` messages this node received from its peers"
- n: "→ → →<br>`port`"
t: "number (int)"
@ -121,8 +121,8 @@ The `getnetworkinfo` RPC {{summary_getNetworkInfo}}
- n: "→ → →<br>`score`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The number of incoming connections during the uptime of this node that have used this address in their `version` message"
d: "The number of incoming connections during the uptime of this node that have used this `address` in their `version` message"
- n: "→<br>`warnings`"
t: "string"
p: "Required<br>(exactly 1)"
@ -130,23 +130,24 @@ The `getnetworkinfo` RPC {{summary_getNetworkInfo}}
{% enditemplate %}
*Example from Bitcoin Core 0.13.1*
*Example from Dash Core 0.12.2*
{% highlight bash %}
bitcoin-cli getnetworkinfo
dash-cli getnetworkinfo
{% endhighlight %}
Result (actual addresses have been replaced with reserved addresses):
Result (actual addresses<!--noref--> have been replaced with [RFC5737][] reserved addresses<!--noref-->):
{% highlight json %}
{
"version": 130100,
"subversion": "/Satoshi:0.13.1/",
"protocolversion": 70014,
"localservices": "000000000000000d",
"version": 120200,
"subversion": "/Dash Core:0.12.2/",
"protocolversion": 70208,
"localservices": "0000000000000005",
"localrelay": true,
"timeoffset": -19,
"connections": 8,
"timeoffset": 0,
"networkactive": true,
"connections": 9,
"networks": [
{
"name": "ipv4",
@ -154,14 +155,14 @@ Result (actual addresses have been replaced with reserved addresses):
"reachable": true,
"proxy": "",
"proxy_randomize_credentials": false
},
},
{
"name": "ipv6",
"limited": false,
"reachable": true,
"proxy": "",
"proxy_randomize_credentials": false
},
},
{
"name": "onion",
"limited": true,
@ -170,16 +171,17 @@ Result (actual addresses have been replaced with reserved addresses):
"proxy_randomize_credentials": false
}
],
"relayfee": 5000.00000000,
"relayfee": 0.00001000,
"localaddresses": [
{
"address": "0600:3c03::f03c:91ff:fe89:dfc4",
"port": 8333,
"address": "192.0.2.113",
"port": 19999,
"score": 4
}
],
"warnings": ""
}
{% endhighlight %}
*See also*

View file

@ -23,7 +23,7 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
p: "Required<br>(exactly 1)"
d: "An array of objects each describing one connected node. If there are no connections, the array will be empty"
- n: "→<br>Node"
- n: "→<br>Node<!--noref-->"
t: "object"
p: "Optional<br>(0 or more)"
d: "An object describing a particular connected node"
@ -31,7 +31,7 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
- n: "→ →<br>`id`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The node's index number in the local node address database"
d: "The node's index number in the local node address<!--noref--> database"
- n: "→ →<br>`addr`"
t: "string"
@ -41,7 +41,7 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
- n: "→ →<br>`addrlocal`"
t: "string"
p: "Optional<br>(0 or 1)"
d: "Our IP address and port number according to the remote node. May be incorrect due to error or lying. Most SPV nodes set this to `127.0.0.1:8333`"
d: "Our IP address and port number according to the remote node. May be incorrect due to error or lying. Most SPV nodes set this to `127.0.0.1:9999`"
- n: "→ →<br>`services`"
t: "string (hex)"
@ -72,7 +72,7 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The Unix epoch time when we connected to this node"
- n: "→ →<br>`timeoffset`"
t: "number (int)"
p: "Required<br>(exactly 1)"
@ -82,7 +82,7 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
t: "number (real)"
p: "Required<br>(exactly 1)"
d: "The number of seconds this node took to respond to our last P2P `ping` message"
- n: "→ →<br>`minping`"
t: "number (real)"
p: "Optional<br>(0 or 1)"
@ -106,7 +106,7 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
- n: "→ →<br>`inbound`"
t: "bool"
p: "Required<br>(exactly 1)"
d: "Set to `true` if this node connected to us; set to `false` if we connected to this node"
d: "Set to `true` if this node connected to us (inbound); set to `false` if we connected to this node (outbound)"
- n: "→ →<br>`startingheight`"
t: "number (int)"
@ -116,7 +116,7 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
- n: "→ →<br>`banscore`"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The ban score we've assigned the node based on any misbehavior it's made. By default, Bitcoin Core disconnects when the ban score reaches `100`"
d: "The ban score we've assigned the node based on any misbehavior it's made. By default, Dash Core disconnects when the ban score reaches `100`"
- n: "→ →<br>`synced_headers`"
t: "number (int)"
@ -133,7 +133,7 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
p: "Required<br>(exactly 1)"
d: "An array of blocks which have been requested from this peer. May be empty"
- n: "→ → →<br>Blocks"
- n: "→ → →<br>Blocks<!--noref-->"
t: "number (int)"
p: "Optional<br>(0 or more)"
d: "The height of a block being requested from the remote peer"
@ -147,29 +147,28 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
t: "string : <br>object"
p: "Required<br>(exactly 1)"
d: "*Added in Bitcoin Core 0.13.0*<br><br>Information about total sent bytes aggregated by message type"
- n: "→ → →<br>Message Type"
t: "number (int)"
p: "Required<br>(1 or more)"
d: "Total sent bytes aggregated by message type. One field for every used message type"
- n: "→ →<br>`bytesrecv_per_msg`"
t: "string : <br>object"
p: "Required<br>(exactly 1)"
d: "*Added in Bitcoin Core 0.13.0*<br><br>Information about total received bytes aggregated by message type"
- n: "→ → →<br>Message Type"
t: "number (int)"
p: "Required<br>(1 or more)"
d: "Total received bytes aggregated by message type. One field for every used message type"
{% enditemplate %}
*Example from Bitcoin Core 0.13.1*
*Example from Dash Core 0.12.2*
{% highlight bash %}
bitcoin-cli getpeerinfo
dash-cli getpeerinfo
{% endhighlight %}
Result (edited to show only a single entry, with IP addresses changed to
@ -177,47 +176,74 @@ Result (edited to show only a single entry, with IP addresses changed to
{% highlight json %}
[
{
{
"id": 3,
"addr": "192.0.2.113:43132",
"addrlocal": "127.0.0.1:8333",
"services": "0000000000000000",
"addr": "192.0.2.113:19999",
"addrlocal": "127.0.0.1:56332",
"services": "0000000000000005",
"relaytxes": true,
"lastsend": 1481158534,
"lastrecv": 1481158534,
"bytessent": 142772,
"bytesrecv": 14167,
"conntime": 1481158420,
"timeoffset": 11,
"pingtime": 0.226368,
"minping": 0.226368,
"version": 70001,
"subver": "/Satoshi:0.12.1/",
"inbound": true,
"startingheight": 0,
"lastsend": 1507818327,
"lastrecv": 1507818327,
"bytessent": 844135,
"bytesrecv": 887651,
"conntime": 1507808575,
"timeoffset": 0,
"pingtime": 0.189852,
"minping": 0.187152,
"version": 70208,
"subver": "/Dash Core:0.12.2/",
"inbound": false,
"startingheight": 8416,
"banscore": 0,
"synced_headers": -1,
"synced_blocks": -1,
"synced_headers": 8474,
"synced_blocks": 8474,
"inflight": [
],
"whitelisted": false,
"bytessent_per_msg": {
"addr": 55,
"inv": 12161,
"ping": 32,
"pong": 1824,
"tx": 128549,
"addr": 165,
"dseg": 65,
"dsq": 33984,
"getaddr": 24,
"getdata": 73261,
"getheaders": 861,
"getsporks": 48,
"govobj": 20244,
"govobjvote": 22196,
"govsync": 545682,
"headers": 106,
"inv": 139035,
"mnget": 28,
"notfound": 1220,
"ping": 2624,
"pong": 2624,
"sendheaders": 24,
"ssc": 1792,
"verack": 24,
"version": 127
"version": 128
},
"bytesrecv_per_msg": {
"getdata": 12161,
"ping": 1824,
"pong": 32,
"addr": 4365,
"block": 22307,
"dsq": 33984,
"getdata": 10417,
"getheaders": 861,
"govobjvote": 179,
"govsync": 4620,
"headers": 6254,
"inv": 130964,
"mnp": 352,
"mnw": 600208,
"notfound": 31192,
"ping": 2624,
"pong": 2624,
"sendheaders": 24,
"spork": 2860,
"ssc": 33664,
"verack": 24,
"version": 126
"version": 128
}
}
},
]
{% endhighlight %}

View file

@ -25,11 +25,11 @@ The `listbanned` RPC {{summary_listBanned}}
p: "Required<br>(exactly 1)"
d: "An array of objects each describing one entry. If there are no entries in the ban list, the array will be empty"
- n: "→<br>Node"
- n: "→<br>Node<!--noref-->"
t: "object"
p: "Optional<br>(0 or more)"
d: "A ban list entry"
- n: "→ →<br>`address`"
t: "string"
p: "Required<br>(exactly 1)"
@ -44,7 +44,7 @@ The `listbanned` RPC {{summary_listBanned}}
t: "number<br>(int)"
p: "Required<br>(exactly 1)"
d: "The Unix epoch time until the IP/Subnet is banned"
- n: "→ →<br>`ban_reason`"
t: "string"
p: "Required<br>(exactly 1)"
@ -52,29 +52,28 @@ The `listbanned` RPC {{summary_listBanned}}
{% enditemplate %}
*Examples from Bitcoin Core 0.12.1*
*Examples from Dash Core 0.12.2*
The default (`false`):
{% highlight bash %}
bitcoin-cli listbanned
dash-cli listbanned
{% endhighlight %}
Result:
{% highlight json %}
[
{
"address": "83.84.25.82/32",
"banned_until": 1487269503,
"ban_created": 1478629503,
"address": "192.0.2.201/32",
"banned_until": 1507906175,
"ban_created": 1507819775,
"ban_reason": "node misbehaving"
},
{
"address": "111.111.0.111/32",
"banned_until": 1487791655,
"ban_created": 1479151655,
"address": "192.0.2.101/32",
"banned_until": 1507906199,
"ban_created": 1507819799,
"ban_reason": "manually added"
}
]

View file

@ -7,7 +7,7 @@ http://opensource.org/licenses/MIT.
##### Ping {#ping-rpc}
{% include helpers/subhead-links.md %}
{% 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_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<!--noref--> ping." %}
{% autocrossref %}
@ -25,10 +25,10 @@ The `ping` RPC {{summary_ping-rpc}}
{% enditemplate %}
*Example from Bitcoin Core 0.10.0*
*Example from Dash Core 0.12.2*
{% highlight bash %}
bitcoin-cli -testnet ping
dash-cli -testnet ping
{% endhighlight %}
(Success: no result printed.)
@ -36,7 +36,7 @@ bitcoin-cli -testnet ping
Get the results using the `getpeerinfo` RPC:
{% highlight bash %}
bitcoin-cli -testnet getpeerinfo | grep ping
dash-cli -testnet getpeerinfo | grep ping
{% endhighlight %}
Results:

View file

@ -31,7 +31,7 @@ The `setban` RPC {{summary_setBan}}
- n: "Command"
t: "string"
p: "Required<br>(exactly 1)"
d: "What to do with the IP/Subnet address above. Options are:<br>`add` to add a node to the addnode list<br>`remove` to remove a node from the list. If currently connected, this will disconnect immediately"
d: "What to do with the IP/Subnet address<!--noref--> above. Options are:<br>`add` to add a node to the addnode list<br>`remove` to remove a node from the list. If currently connected, this will disconnect immediately"
{% enditemplate %}
@ -65,15 +65,15 @@ The `setban` RPC {{summary_setBan}}
{% enditemplate %}
*Example from Bitcoin Core 0.12.1*
*Example from Dash Core 0.12.2*
Ban the following node.
{% highlight bash %}
bitcoin-cli -testnet setban 192.0.2.113:18333 add 2592000
dash-cli -testnet setban 192.0.2.113 add 2592000
{% endhighlight %}
Result (no output from `bitcoin-cli` because result is set to `null`).
Result (no output from `dash-cli` because result is set to `null`).
*See also*