diff --git a/src/net.h b/src/net.h index bdc56de1b..d55d500e1 100644 --- a/src/net.h +++ b/src/net.h @@ -223,6 +223,7 @@ public: int nStartingHeight; uint64_t nSendBytes; uint64_t nRecvBytes; + bool fRelayTxes; bool fAllowlisted; // If true this node bypasses DoS ban limits bool fFeeler; // If true this node is being used as a short lived feeler. double dPingTime; diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 46c3cf24d..6ea9819a8 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -95,6 +95,7 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) " \"lastrecv\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive\n" " \"bytessent\": n, (numeric) The total bytes sent\n" " \"bytesrecv\": n, (numeric) The total bytes received\n" + " \"relaytxes\":true|false, (boolean) Whether peer has asked us to relay transactions to it\n" " \"conntime\": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)\n" " \"timeoffset\": ttt, (numeric) The time offset in seconds (deprecated, always 0)\n" " \"pingtime\": n, (numeric) ping time\n" @@ -146,6 +147,8 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp, const CPubKey& mypk) obj.push_back(Pair("lastrecv", stats.nLastRecv)); obj.push_back(Pair("bytessent", stats.nSendBytes)); obj.push_back(Pair("bytesrecv", stats.nRecvBytes)); + obj.push_back(Pair("relaytxes", stats.fRelayTxes)); + obj.push_back(Pair("conntime", stats.nTimeConnected)); obj.push_back(Pair("timeoffset", 0)); obj.push_back(Pair("pingtime", stats.dPingTime));