aboutsummaryrefslogtreecommitdiff
path: root/src/rpcnet.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <[email protected]>2014-07-15 07:13:10 -0700
committerGregory Maxwell <[email protected]>2014-07-15 07:13:10 -0700
commitc4a321f5c6f266bdf99d7f3557210994b5c75f96 (patch)
treef703821f4d0feeb7cf871585582affaa34f960a9 /src/rpcnet.cpp
parentMerge pull request #4505 (diff)
downloaddiscoin-c4a321f5c6f266bdf99d7f3557210994b5c75f96.tar.xz
discoin-c4a321f5c6f266bdf99d7f3557210994b5c75f96.zip
Add peerid to getpeerinfo to allow correlation with the logs.
This seems to have been missed in 3764.
Diffstat (limited to 'src/rpcnet.cpp')
-rw-r--r--src/rpcnet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 680717930..bd3609b0c 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -79,6 +79,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
"\nbResult:\n"
"[\n"
" {\n"
+ " \"id\": n, (numeric) Peer index\n"
" \"addr\":\"host:port\", (string) The ip address and port of the peer\n"
" \"addrlocal\":\"ip:port\", (string) local address\n"
" \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services offered\n"
@@ -113,6 +114,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
Object obj;
CNodeStateStats statestats;
bool fStateStats = GetNodeStateStats(stats.nodeid, statestats);
+ obj.push_back(Pair("id", stats.nodeid));
obj.push_back(Pair("addr", stats.addrName));
if (!(stats.addrLocal.empty()))
obj.push_back(Pair("addrlocal", stats.addrLocal));