aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-10-03 15:26:42 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-10-03 15:27:58 +0200
commitcd91ed4f5f32a3ecf907a2ab37679c41d8d1755c (patch)
tree3b98d48e7a4528e6b792c37fa1d5bfb5034ab4c0
parent5ccd735d30472d8e7acc30d242a142f3cc9968ef (diff)
parentb5ec5fe0cb0a85cb626167b66fdda3bed8c5ba19 (diff)
Merge pull request #4982
b5ec5fe update getnetworkinfo help with subversion (Philip Kaufmann)
-rw-r--r--src/rpcnet.cpp42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index fb159d96f6..bc19d1372a 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -368,23 +368,29 @@ Value getnetworkinfo(const Array& params, bool fHelp)
"Returns an object containing various state info regarding P2P networking.\n"
"\nResult:\n"
"{\n"
- " \"version\": xxxxx, (numeric) the server version\n"
- " \"protocolversion\": xxxxx, (numeric) the protocol version\n"
- " \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
- " \"timeoffset\": xxxxx, (numeric) the time offset\n"
- " \"connections\": xxxxx, (numeric) the number of connections\n"
- " \"networks\": [ (array) information per network\n"
- " \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n"
- " \"limited\": xxx, (boolean) is the network limited using -onlynet?\n"
- " \"reachable\": xxx, (boolean) is the network reachable?\n"
- " \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n"
- " },\n"
+ " \"version\": xxxxx, (numeric) the server version\n"
+ " \"subversion\": \"/Satoshi:x.x.x/\", (string) the server subversion string\n"
+ " \"protocolversion\": xxxxx, (numeric) the protocol version\n"
+ " \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
+ " \"timeoffset\": xxxxx, (numeric) the time offset\n"
+ " \"connections\": xxxxx, (numeric) the number of connections\n"
+ " \"networks\": [ (array) information per network\n"
+ " {\n"
+ " \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n"
+ " \"limited\": true|false, (boolean) is the network limited using -onlynet?\n"
+ " \"reachable\": true|false, (boolean) is the network reachable?\n"
+ " \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n"
+ " }\n"
+ " ,...\n"
" ],\n"
- " \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
- " \"localaddresses\": [, (array) list of local addresses\n"
- " \"address\": \"xxxx\", (string) network address\n"
- " \"port\": xxx, (numeric) network port\n"
- " \"score\": xxx (numeric) relative score\n"
+ " \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n"
+ " \"localaddresses\": [ (array) list of local addresses\n"
+ " {\n"
+ " \"address\": \"xxxx\", (string) network address\n"
+ " \"port\": xxx, (numeric) network port\n"
+ " \"score\": xxx (numeric) relative score\n"
+ " }\n"
+ " ,...\n"
" ]\n"
"}\n"
"\nExamples:\n"
@@ -393,10 +399,10 @@ Value getnetworkinfo(const Array& params, bool fHelp)
);
Object obj;
- obj.push_back(Pair("version", (int)CLIENT_VERSION));
+ obj.push_back(Pair("version", CLIENT_VERSION));
obj.push_back(Pair("subversion",
FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>())));
- obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
+ obj.push_back(Pair("protocolversion",PROTOCOL_VERSION));
obj.push_back(Pair("localservices", strprintf("%016x", nLocalServices)));
obj.push_back(Pair("timeoffset", GetTimeOffset()));
obj.push_back(Pair("connections", (int)vNodes.size()));