RPC - Add addrbind to getpeerinfo

This commit is contained in:
thephez 2019-08-20 12:48:08 -04:00
parent a7c4394ac3
commit 6fb66f6f4a
3 changed files with 56 additions and 44 deletions

View file

@ -227,7 +227,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
* [GetConnectionCount][rpc getconnectioncount]: {{summary_getConnectionCount}} * [GetConnectionCount][rpc getconnectioncount]: {{summary_getConnectionCount}}
* [GetNetTotals][rpc getnettotals]: {{summary_getNetTotals}} {{UPDATED0_12_0}} * [GetNetTotals][rpc getnettotals]: {{summary_getNetTotals}} {{UPDATED0_12_0}}
* [GetNetworkInfo][rpc getnetworkinfo]: {{summary_getNetworkInfo}} {{DASH_UPDATED0_14_0}} * [GetNetworkInfo][rpc getnetworkinfo]: {{summary_getNetworkInfo}} {{DASH_UPDATED0_14_0}}
* [GetPeerInfo][rpc getpeerinfo]: {{summary_getPeerInfo}} {{UPDATED0_13_0}} * [GetPeerInfo][rpc getpeerinfo]: {{summary_getPeerInfo}} {{DASH_UPDATED0_14_1}}
* [ListBanned][rpc listbanned]: {{summary_listBanned}} {{NEW0_12_0}} * [ListBanned][rpc listbanned]: {{summary_listBanned}} {{NEW0_12_0}}
* [Ping][rpc ping]: {{summary_ping-rpc}} * [Ping][rpc ping]: {{summary_ping-rpc}}
* [SetBan][rpc setban]: {{summary_setBan}} {{NEW0_12_0}} * [SetBan][rpc setban]: {{summary_setBan}} {{NEW0_12_0}}

View file

@ -3,6 +3,7 @@ This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT. http://opensource.org/licenses/MIT.
{% endcomment %} {% endcomment %}
{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/getpeerinfo.md" %} {% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/getpeerinfo.md" %}
<--__-->
##### GetPeerInfo ##### GetPeerInfo
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}
@ -43,6 +44,11 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
p: "Optional<br>(0 or 1)" 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:9999`" 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>`addrbind`"
t: "string"
p: "Optional<br>(0 or 1)"
d: "Bind address of the connection to the peer"
- n: "→ →<br>`services`" - n: "→ →<br>`services`"
t: "string (hex)" t: "string (hex)"
p: "Required<br>(exactly 1)" p: "Required<br>(exactly 1)"
@ -108,6 +114,11 @@ The `getpeerinfo` RPC {{summary_getPeerInfo}}
p: "Required<br>(exactly 1)" p: "Required<br>(exactly 1)"
d: "Set to `true` if this node connected to us (inbound); set to `false` if we connected to this node (outbound)" d: "Set to `true` if this node connected to us (inbound); set to `false` if we connected to this node (outbound)"
- n: "→ →<br>`addnode`"
t: "bool"
p: "Required<br>(exactly 1)"
d: "Set to `true` if this node was added via the `addnode` RPC."
- n: "→ →<br>`startingheight`" - n: "→ →<br>`startingheight`"
t: "number (int)" t: "number (int)"
p: "Required<br>(exactly 1)" p: "Required<br>(exactly 1)"
@ -180,6 +191,7 @@ Result (edited to show only a single entry, with IP addresses changed to
"id": 3, "id": 3,
"addr": "192.0.2.113:19999", "addr": "192.0.2.113:19999",
"addrlocal": "127.0.0.1:56332", "addrlocal": "127.0.0.1:56332",
"addrbind": "192.168.10.111:56332",
"services": "0000000000000005", "services": "0000000000000005",
"relaytxes": true, "relaytxes": true,
"lastsend": 1507818327, "lastsend": 1507818327,
@ -188,62 +200,62 @@ Result (edited to show only a single entry, with IP addresses changed to
"bytesrecv": 887651, "bytesrecv": 887651,
"conntime": 1507808575, "conntime": 1507808575,
"timeoffset": 0, "timeoffset": 0,
"pingtime": 0.189852, "pingtime": 0.113646,
"minping": 0.187152, "minping": 0.106826,
"version": 70208, "version": 70215,
"subver": "/Dash Core:0.12.2/", "subver": "/Dash Core:0.14.0.3/",
"inbound": false, "inbound": false,
"startingheight": 8416, "addnode": false,
"startingheight": 159292,
"banscore": 0, "banscore": 0,
"synced_headers": 8474, "synced_headers": 159350,
"synced_blocks": 8474, "synced_blocks": 159350,
"inflight": [ "inflight": [
], ],
"whitelisted": false, "whitelisted": false,
"bytessent_per_msg": { "bytessent_per_msg": {
"addr": 165, "addr": 55,
"dseg": 65, "dsq": 69530,
"dsq": 33984,
"getaddr": 24, "getaddr": 24,
"getdata": 73261, "getdata": 9224,
"getheaders": 861, "getheaders": 989,
"getsporks": 48, "getsporks": 24,
"govobj": 20244, "govsync": 66,
"govobjvote": 22196, "headers": 6148,
"govsync": 545682, "inv": 837,
"headers": 106, "ping": 1856,
"inv": 139035, "pong": 1856,
"mnget": 28, "qsendrecsigs": 25,
"notfound": 1220, "sendcmpct": 33,
"ping": 2624, "senddsq": 25,
"pong": 2624,
"sendheaders": 24, "sendheaders": 24,
"ssc": 1792, "tx": 5808,
"verack": 24, "verack": 24,
"version": 128 "version": 160
}, },
"bytesrecv_per_msg": { "bytesrecv_per_msg": {
"addr": 4365, "*other*": 25,
"block": 22307, "addr": 17362,
"dsq": 33984, "clsig": 3276,
"getdata": 10417, "getdata": 122,
"getheaders": 861, "getheaders": 989,
"govobjvote": 179, "headers": 5300,
"govsync": 4620, "inv": 24611,
"headers": 6254, "islock": 3249,
"inv": 130964, "mnauth": 152,
"mnp": 352, "ping": 1856,
"mnw": 600208, "pong": 1856,
"notfound": 31192, "qsigrec": 16492,
"ping": 2624, "sendcmpct": 33,
"pong": 2624, "senddsq": 25,
"sendheaders": 24, "sendheaders": 24,
"spork": 2860, "spork": 2090,
"ssc": 33664, "ssc": 32,
"tx": 11523,
"verack": 24, "verack": 24,
"version": 128 "version": 162
}
} }
},
] ]
{% endhighlight %} {% endhighlight %}

View file

@ -425,7 +425,7 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header::
<td class="tg-b7b8">Network</td> <td class="tg-b7b8">Network</td>
<td class="tg-b7b8"><a href="#getpeerinfo">GetPeerInfo</a></td> <td class="tg-b7b8"><a href="#getpeerinfo">GetPeerInfo</a></td>
<td class="tg-dzk6">Y</td> <td class="tg-dzk6">Y</td>
<td class="tg-dzk6"></td> <td class="tg-dzk6">Updated in 0.14.1</td>
</tr> </tr>
<tr> <tr>
<td class="tg-yw4l">Network</td> <td class="tg-yw4l">Network</td>