mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Report minimum ping time in getpeerinfo
This commit is contained in:
@@ -96,6 +96,7 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp)
|
||||
" \"conntime\": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT)\n"
|
||||
" \"timeoffset\": ttt, (numeric) The time offset in seconds\n"
|
||||
" \"pingtime\": n, (numeric) ping time\n"
|
||||
" \"minping\": n, (numeric) minimum observed ping time\n"
|
||||
" \"pingwait\": n, (numeric) ping wait\n"
|
||||
" \"version\": v, (numeric) The peer version, such as 7001\n"
|
||||
" \"subver\": \"/Satoshi:0.8.5/\", (string) The string version\n"
|
||||
@@ -139,6 +140,7 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp)
|
||||
obj.push_back(Pair("conntime", stats.nTimeConnected));
|
||||
obj.push_back(Pair("timeoffset", stats.nTimeOffset));
|
||||
obj.push_back(Pair("pingtime", stats.dPingTime));
|
||||
obj.push_back(Pair("minping", stats.dPingMin));
|
||||
if (stats.dPingWait > 0.0)
|
||||
obj.push_back(Pair("pingwait", stats.dPingWait));
|
||||
obj.push_back(Pair("version", stats.nVersion));
|
||||
|
||||
Reference in New Issue
Block a user