Skip to content

Commit 1ab1dc3

Browse files
committed
rpc: Add relaytxes flag to getnetworkinfo
Re-work of PR #7841 by dragongem45. Closes #7771.
1 parent 581ddff commit 1ab1dc3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/rpc/net.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
460460
" \"subversion\": \"/Satoshi:x.x.x/\", (string) the server subversion string\n"
461461
" \"protocolversion\": xxxxx, (numeric) the protocol version\n"
462462
" \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
463+
" \"localrelay\": true|false, (bool) true if transaction relay is requested from peers\n"
463464
" \"timeoffset\": xxxxx, (numeric) the time offset\n"
464465
" \"connections\": xxxxx, (numeric) the number of connections\n"
465466
" \"networks\": [ (array) information per network\n"
@@ -494,6 +495,7 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
494495
obj.push_back(Pair("subversion", strSubVersion));
495496
obj.push_back(Pair("protocolversion",PROTOCOL_VERSION));
496497
obj.push_back(Pair("localservices", strprintf("%016x", nLocalServices)));
498+
obj.push_back(Pair("localrelay", fRelayTxes));
497499
obj.push_back(Pair("timeoffset", GetTimeOffset()));
498500
obj.push_back(Pair("connections", (int)vNodes.size()));
499501
obj.push_back(Pair("networks", GetNetworksInfo()));

0 commit comments

Comments
 (0)