|
|
@ -368,23 +368,29 @@ Value getnetworkinfo(const Array& params, bool fHelp) |
|
|
|
"Returns an object containing various state info regarding P2P networking.\n" |
|
|
|
"Returns an object containing various state info regarding P2P networking.\n" |
|
|
|
"\nResult:\n" |
|
|
|
"\nResult:\n" |
|
|
|
"{\n" |
|
|
|
"{\n" |
|
|
|
" \"version\": xxxxx, (numeric) the server version\n" |
|
|
|
" \"version\": xxxxx, (numeric) the server version\n" |
|
|
|
" \"protocolversion\": xxxxx, (numeric) the protocol version\n" |
|
|
|
" \"subversion\": \"/Satoshi:x.x.x/\", (string) the server subversion string\n" |
|
|
|
" \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n" |
|
|
|
" \"protocolversion\": xxxxx, (numeric) the protocol version\n" |
|
|
|
" \"timeoffset\": xxxxx, (numeric) the time offset\n" |
|
|
|
" \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n" |
|
|
|
" \"connections\": xxxxx, (numeric) the number of connections\n" |
|
|
|
" \"timeoffset\": xxxxx, (numeric) the time offset\n" |
|
|
|
" \"networks\": [ (array) information per network\n" |
|
|
|
" \"connections\": xxxxx, (numeric) the number of connections\n" |
|
|
|
" \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n" |
|
|
|
" \"networks\": [ (array) information per network\n" |
|
|
|
" \"limited\": xxx, (boolean) is the network limited using -onlynet?\n" |
|
|
|
" {\n" |
|
|
|
" \"reachable\": xxx, (boolean) is the network reachable?\n" |
|
|
|
" \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n" |
|
|
|
" \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n" |
|
|
|
" \"limited\": true|false, (boolean) is the network limited using -onlynet?\n" |
|
|
|
" },\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" |
|
|
|
" ],\n" |
|
|
|
" \"relayfee\": x.xxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n" |
|
|
|
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for non-free transactions in btc/kb\n" |
|
|
|
" \"localaddresses\": [, (array) list of local addresses\n" |
|
|
|
" \"localaddresses\": [ (array) list of local addresses\n" |
|
|
|
" \"address\": \"xxxx\", (string) network address\n" |
|
|
|
" {\n" |
|
|
|
" \"port\": xxx, (numeric) network port\n" |
|
|
|
" \"address\": \"xxxx\", (string) network address\n" |
|
|
|
" \"score\": xxx (numeric) relative score\n" |
|
|
|
" \"port\": xxx, (numeric) network port\n" |
|
|
|
|
|
|
|
" \"score\": xxx (numeric) relative score\n" |
|
|
|
|
|
|
|
" }\n" |
|
|
|
|
|
|
|
" ,...\n" |
|
|
|
" ]\n" |
|
|
|
" ]\n" |
|
|
|
"}\n" |
|
|
|
"}\n" |
|
|
|
"\nExamples:\n" |
|
|
|
"\nExamples:\n" |
|
|
@ -393,10 +399,10 @@ Value getnetworkinfo(const Array& params, bool fHelp) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
Object obj; |
|
|
|
Object obj; |
|
|
|
obj.push_back(Pair("version", (int)CLIENT_VERSION)); |
|
|
|
obj.push_back(Pair("version", CLIENT_VERSION)); |
|
|
|
obj.push_back(Pair("subversion", |
|
|
|
obj.push_back(Pair("subversion", |
|
|
|
FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>()))); |
|
|
|
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("localservices", strprintf("%016x", nLocalServices))); |
|
|
|
obj.push_back(Pair("timeoffset", GetTimeOffset())); |
|
|
|
obj.push_back(Pair("timeoffset", GetTimeOffset())); |
|
|
|
obj.push_back(Pair("connections", (int)vNodes.size())); |
|
|
|
obj.push_back(Pair("connections", (int)vNodes.size())); |
|
|
|