Show relay status in getpeerinfo
This commit is contained in:
@@ -223,6 +223,7 @@ public:
|
|||||||
int nStartingHeight;
|
int nStartingHeight;
|
||||||
uint64_t nSendBytes;
|
uint64_t nSendBytes;
|
||||||
uint64_t nRecvBytes;
|
uint64_t nRecvBytes;
|
||||||
|
bool fRelayTxes;
|
||||||
bool fAllowlisted; // If true this node bypasses DoS ban limits
|
bool fAllowlisted; // If true this node bypasses DoS ban limits
|
||||||
bool fFeeler; // If true this node is being used as a short lived feeler.
|
bool fFeeler; // If true this node is being used as a short lived feeler.
|
||||||
double dPingTime;
|
double dPingTime;
|
||||||
|
|||||||
@@ -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"
|
" \"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"
|
" \"bytessent\": n, (numeric) The total bytes sent\n"
|
||||||
" \"bytesrecv\": n, (numeric) The total bytes received\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"
|
" \"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"
|
" \"timeoffset\": ttt, (numeric) The time offset in seconds (deprecated, always 0)\n"
|
||||||
" \"pingtime\": n, (numeric) ping time\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("lastrecv", stats.nLastRecv));
|
||||||
obj.push_back(Pair("bytessent", stats.nSendBytes));
|
obj.push_back(Pair("bytessent", stats.nSendBytes));
|
||||||
obj.push_back(Pair("bytesrecv", stats.nRecvBytes));
|
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("conntime", stats.nTimeConnected));
|
||||||
obj.push_back(Pair("timeoffset", 0));
|
obj.push_back(Pair("timeoffset", 0));
|
||||||
obj.push_back(Pair("pingtime", stats.dPingTime));
|
obj.push_back(Pair("pingtime", stats.dPingTime));
|
||||||
|
|||||||
Reference in New Issue
Block a user