aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-05-12 14:09:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-05-12 14:26:49 +0200
commit1ab1dc3140ff521df42f1f396a49a50e91bf2740 (patch)
tree68f624434fbcb9c0b5ca6a13833368388241b54c
parent581ddff05c92eb835a20c2be9ccf5d2d37b94883 (diff)
downloadbitcoin-1ab1dc3140ff521df42f1f396a49a50e91bf2740.tar.xz
rpc: Add `relaytxes` flag to `getnetworkinfo`
Re-work of PR #7841 by dragongem45. Closes #7771.
-rw-r--r--src/rpc/net.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 320091b9c4..3297d2c6ee 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -460,6 +460,7 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
" \"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"
+ " \"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"
" \"networks\": [ (array) information per network\n"
@@ -494,6 +495,7 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
obj.push_back(Pair("subversion", strSubVersion));
obj.push_back(Pair("protocolversion",PROTOCOL_VERSION));
obj.push_back(Pair("localservices", strprintf("%016x", nLocalServices)));
+ obj.push_back(Pair("localrelay", fRelayTxes));
obj.push_back(Pair("timeoffset", GetTimeOffset()));
obj.push_back(Pair("connections", (int)vNodes.size()));
obj.push_back(Pair("networks", GetNetworksInfo()));