mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
scripted-diff: Add missing spaces in RPCResult, Fix type names
This makes the rendered diff smaller when the RPCResult is machine generated later on -BEGIN VERIFY SCRIPT- # Add space after dictionary key and before colon sed -i --regexp-extended -e 's/(^ +" +\\"[a-zA-Z_]+\\"): ?/\1 : /g' $(git grep -l '\\":') # Rename (array) to (json array) sed -i -e 's/ (array) / (json array) /g' $(git grep -l '(array)' ./src) # Rename (object) to (json object) sed -i -e 's/ (object) / (json object) /g' $(git grep -l '(object)' ./src) # Rename (bool) to (boolean) sed -i -e 's/ (bool) / (boolean) /g' $(git grep -l '(bool)' ./src) # Rename (int) to (numeric) sed -i -e 's/ (int) / (numeric) /g' $(git grep -l '(int)' ./src) -END VERIFY SCRIPT-
This commit is contained in:
126
src/rpc/net.cpp
126
src/rpc/net.cpp
@@ -79,48 +79,48 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
RPCResult{
|
||||
"[\n"
|
||||
" {\n"
|
||||
" \"id\": n, (numeric) Peer index\n"
|
||||
" \"addr\":\"host:port\", (string) The IP address and port of the peer\n"
|
||||
" \"addrbind\":\"ip:port\", (string) Bind address of the connection to the peer\n"
|
||||
" \"addrlocal\":\"ip:port\", (string) Local address as reported by the peer\n"
|
||||
" \"mapped_as\":\"mapped_as\", (string) The AS in the BGP route to the peer used for diversifying peer selection\n"
|
||||
" \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services offered\n"
|
||||
" \"servicesnames\":[ (array) the services offered, in human-readable form\n"
|
||||
" \"id\" : n, (numeric) Peer index\n"
|
||||
" \"addr\" : \"host:port\", (string) The IP address and port of the peer\n"
|
||||
" \"addrbind\" : \"ip:port\", (string) Bind address of the connection to the peer\n"
|
||||
" \"addrlocal\" : \"ip:port\", (string) Local address as reported by the peer\n"
|
||||
" \"mapped_as\" : \"mapped_as\", (string) The AS in the BGP route to the peer used for diversifying peer selection\n"
|
||||
" \"services\" : \"xxxxxxxxxxxxxxxx\", (string) The services offered\n"
|
||||
" \"servicesnames\" : [ (json array) the services offered, in human-readable form\n"
|
||||
" \"SERVICE_NAME\", (string) the service name if it is recognised\n"
|
||||
" ...\n"
|
||||
" ],\n"
|
||||
" \"relaytxes\":true|false, (boolean) Whether peer has asked us to relay transactions to it\n"
|
||||
" \"lastsend\": ttt, (numeric) The " + UNIX_EPOCH_TIME + " of the last send\n"
|
||||
" \"lastrecv\": ttt, (numeric) The " + UNIX_EPOCH_TIME + " of the last receive\n"
|
||||
" \"bytessent\": n, (numeric) The total bytes sent\n"
|
||||
" \"bytesrecv\": n, (numeric) The total bytes received\n"
|
||||
" \"conntime\": ttt, (numeric) The " + UNIX_EPOCH_TIME + " of the connection\n"
|
||||
" \"timeoffset\": ttt, (numeric) The time offset in seconds\n"
|
||||
" \"pingtime\": n, (numeric) ping time (if available)\n"
|
||||
" \"minping\": n, (numeric) minimum observed ping time (if any at all)\n"
|
||||
" \"pingwait\": n, (numeric) ping wait (if non-zero)\n"
|
||||
" \"version\": v, (numeric) The peer version, such as 70001\n"
|
||||
" \"subver\": \"/Satoshi:0.8.5/\", (string) The string version\n"
|
||||
" \"inbound\": true|false, (boolean) Inbound (true) or Outbound (false)\n"
|
||||
" \"addnode\": true|false, (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection\n"
|
||||
" \"startingheight\": n, (numeric) The starting height (block) of the peer\n"
|
||||
" \"banscore\": n, (numeric) The ban score\n"
|
||||
" \"synced_headers\": n, (numeric) The last header we have in common with this peer\n"
|
||||
" \"synced_blocks\": n, (numeric) The last block we have in common with this peer\n"
|
||||
" \"inflight\": [\n"
|
||||
" \"relaytxes\" : true|false, (boolean) Whether peer has asked us to relay transactions to it\n"
|
||||
" \"lastsend\" : ttt, (numeric) The " + UNIX_EPOCH_TIME + " of the last send\n"
|
||||
" \"lastrecv\" : ttt, (numeric) The " + UNIX_EPOCH_TIME + " of the last receive\n"
|
||||
" \"bytessent\" : n, (numeric) The total bytes sent\n"
|
||||
" \"bytesrecv\" : n, (numeric) The total bytes received\n"
|
||||
" \"conntime\" : ttt, (numeric) The " + UNIX_EPOCH_TIME + " of the connection\n"
|
||||
" \"timeoffset\" : ttt, (numeric) The time offset in seconds\n"
|
||||
" \"pingtime\" : n, (numeric) ping time (if available)\n"
|
||||
" \"minping\" : n, (numeric) minimum observed ping time (if any at all)\n"
|
||||
" \"pingwait\" : n, (numeric) ping wait (if non-zero)\n"
|
||||
" \"version\" : v, (numeric) The peer version, such as 70001\n"
|
||||
" \"subver\" : \"/Satoshi:0.8.5/\", (string) The string version\n"
|
||||
" \"inbound\" : true|false, (boolean) Inbound (true) or Outbound (false)\n"
|
||||
" \"addnode\" : true|false, (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection\n"
|
||||
" \"startingheight\" : n, (numeric) The starting height (block) of the peer\n"
|
||||
" \"banscore\" : n, (numeric) The ban score\n"
|
||||
" \"synced_headers\" : n, (numeric) The last header we have in common with this peer\n"
|
||||
" \"synced_blocks\" : n, (numeric) The last block we have in common with this peer\n"
|
||||
" \"inflight\" : [\n"
|
||||
" n, (numeric) The heights of blocks we're currently asking from this peer\n"
|
||||
" ...\n"
|
||||
" ],\n"
|
||||
" \"whitelisted\": true|false, (boolean) Whether the peer is whitelisted\n"
|
||||
" \"minfeefilter\": n, (numeric) The minimum fee rate for transactions this peer accepts\n"
|
||||
" \"bytessent_per_msg\": {\n"
|
||||
" \"msg\": n, (numeric) The total bytes sent aggregated by message type\n"
|
||||
" \"whitelisted\" : true|false, (boolean) Whether the peer is whitelisted\n"
|
||||
" \"minfeefilter\" : n, (numeric) The minimum fee rate for transactions this peer accepts\n"
|
||||
" \"bytessent_per_msg\" : {\n"
|
||||
" \"msg\" : n, (numeric) The total bytes sent aggregated by message type\n"
|
||||
" When a message type is not listed in this json object, the bytes sent are 0.\n"
|
||||
" Only known message types can appear as keys in the object.\n"
|
||||
" ...\n"
|
||||
" },\n"
|
||||
" \"bytesrecv_per_msg\": {\n"
|
||||
" \"msg\": n, (numeric) The total bytes received aggregated by message type\n"
|
||||
" \"bytesrecv_per_msg\" : {\n"
|
||||
" \"msg\" : n, (numeric) The total bytes received aggregated by message type\n"
|
||||
" When a message type is not listed in this json object, the bytes received are 0.\n"
|
||||
" Only known message types can appear as keys in the object and all bytes received of unknown message types are listed under '"+NET_MESSAGE_COMMAND_OTHER+"'.\n"
|
||||
" ...\n"
|
||||
@@ -387,17 +387,17 @@ static UniValue getnettotals(const JSONRPCRequest& request)
|
||||
{},
|
||||
RPCResult{
|
||||
"{\n"
|
||||
" \"totalbytesrecv\": n, (numeric) Total bytes received\n"
|
||||
" \"totalbytessent\": n, (numeric) Total bytes sent\n"
|
||||
" \"timemillis\": t, (numeric) Current UNIX time in milliseconds\n"
|
||||
" \"uploadtarget\":\n"
|
||||
" \"totalbytesrecv\" : n, (numeric) Total bytes received\n"
|
||||
" \"totalbytessent\" : n, (numeric) Total bytes sent\n"
|
||||
" \"timemillis\" : t, (numeric) Current UNIX time in milliseconds\n"
|
||||
" \"uploadtarget\" : \n"
|
||||
" {\n"
|
||||
" \"timeframe\": n, (numeric) Length of the measuring timeframe in seconds\n"
|
||||
" \"target\": n, (numeric) Target in bytes\n"
|
||||
" \"target_reached\": true|false, (boolean) True if target is reached\n"
|
||||
" \"serve_historical_blocks\": true|false, (boolean) True if serving historical blocks\n"
|
||||
" \"bytes_left_in_cycle\": t, (numeric) Bytes left in current time cycle\n"
|
||||
" \"time_left_in_cycle\": t (numeric) Seconds left in current time cycle\n"
|
||||
" \"timeframe\" : n, (numeric) Length of the measuring timeframe in seconds\n"
|
||||
" \"target\" : n, (numeric) Target in bytes\n"
|
||||
" \"target_reached\" : true|false, (boolean) True if target is reached\n"
|
||||
" \"serve_historical_blocks\" : true|false, (boolean) True if serving historical blocks\n"
|
||||
" \"bytes_left_in_cycle\" : t, (numeric) Bytes left in current time cycle\n"
|
||||
" \"time_left_in_cycle\" : t (numeric) Seconds left in current time cycle\n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
},
|
||||
@@ -453,35 +453,35 @@ static UniValue getnetworkinfo(const JSONRPCRequest& request)
|
||||
{},
|
||||
RPCResult{
|
||||
"{ (json object)\n"
|
||||
" \"version\": xxxxx, (numeric) the server version\n"
|
||||
" \"version\" : xxxxx, (numeric) the server version\n"
|
||||
" \"subversion\" : \"str\", (string) the server subversion string\n"
|
||||
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
|
||||
" \"protocolversion\" : xxxxx, (numeric) the protocol version\n"
|
||||
" \"localservices\" : \"hex\", (string) the services we offer to the network\n"
|
||||
" \"localservicesnames\": [ (array) the services we offer to the network, in human-readable form\n"
|
||||
" \"localservicesnames\" : [ (json array) the services we offer to the network, in human-readable form\n"
|
||||
" \"SERVICE_NAME\", (string) the service name\n"
|
||||
" ...\n"
|
||||
" ],\n"
|
||||
" \"localrelay\": true|false, (bool) true if transaction relay is requested from peers\n"
|
||||
" \"timeoffset\": xxxxx, (numeric) the time offset\n"
|
||||
" \"connections\": xxxxx, (numeric) the number of connections\n"
|
||||
" \"networkactive\": true|false, (bool) whether p2p networking is enabled\n"
|
||||
" \"networks\": [ (array) information per network\n"
|
||||
" \"localrelay\" : true|false, (boolean) true if transaction relay is requested from peers\n"
|
||||
" \"timeoffset\" : xxxxx, (numeric) the time offset\n"
|
||||
" \"connections\" : xxxxx, (numeric) the number of connections\n"
|
||||
" \"networkactive\" : true|false, (boolean) whether p2p networking is enabled\n"
|
||||
" \"networks\" : [ (json array) information per network\n"
|
||||
" { (json object)\n"
|
||||
" \"name\": \"str\", (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"
|
||||
" \"name\" : \"str\", (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\" : \"str\" (string) (\"host:port\") the proxy that is used for this network, or empty if none\n"
|
||||
" \"proxy_randomize_credentials\" : true|false, (bool) Whether randomized credentials are used\n"
|
||||
" \"proxy_randomize_credentials\" : true|false, (boolean) Whether randomized credentials are used\n"
|
||||
" },\n"
|
||||
" ...\n"
|
||||
" ],\n"
|
||||
" \"relayfee\": x.xxxxxxxx, (numeric) minimum relay fee for transactions in " + CURRENCY_UNIT + "/kB\n"
|
||||
" \"incrementalfee\": x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in " + CURRENCY_UNIT + "/kB\n"
|
||||
" \"localaddresses\": [ (array) list of local addresses\n"
|
||||
" \"relayfee\" : x.xxxxxxxx, (numeric) minimum relay fee for transactions in " + CURRENCY_UNIT + "/kB\n"
|
||||
" \"incrementalfee\" : x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in " + CURRENCY_UNIT + "/kB\n"
|
||||
" \"localaddresses\" : [ (json array) list of local addresses\n"
|
||||
" { (json object)\n"
|
||||
" \"address\" : \"xxxx\", (string) network address\n"
|
||||
" \"port\": xxx, (numeric) network port\n"
|
||||
" \"score\": xxx (numeric) relative score\n"
|
||||
" \"port\" : xxx, (numeric) network port\n"
|
||||
" \"score\" : xxx (numeric) relative score\n"
|
||||
" },\n"
|
||||
" ...\n"
|
||||
" ],\n"
|
||||
@@ -695,10 +695,10 @@ static UniValue getnodeaddresses(const JSONRPCRequest& request)
|
||||
RPCResult{
|
||||
"[\n"
|
||||
" {\n"
|
||||
" \"time\": ttt, (numeric) The " + UNIX_EPOCH_TIME + " of when the node was last seen\n"
|
||||
" \"services\": n, (numeric) The services offered\n"
|
||||
" \"address\": \"host\", (string) The address of the node\n"
|
||||
" \"port\": n (numeric) The port of the node\n"
|
||||
" \"time\" : ttt, (numeric) The " + UNIX_EPOCH_TIME + " of when the node was last seen\n"
|
||||
" \"services\" : n, (numeric) The services offered\n"
|
||||
" \"address\" : \"host\", (string) The address of the node\n"
|
||||
" \"port\" : n (numeric) The port of the node\n"
|
||||
" }\n"
|
||||
" ,....\n"
|
||||
"]\n"
|
||||
|
||||
Reference in New Issue
Block a user