mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
refactor: Convert ping wait time from double to int64_t
This commit is contained in:
@@ -169,8 +169,8 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
|
||||
obj.pushKV("pingtime", stats.m_ping_usec / 1e6);
|
||||
if (stats.m_min_ping_usec < std::numeric_limits<int64_t>::max())
|
||||
obj.pushKV("minping", stats.m_min_ping_usec / 1e6);
|
||||
if (stats.dPingWait > 0.0)
|
||||
obj.pushKV("pingwait", stats.dPingWait);
|
||||
if (stats.m_ping_wait_usec > 0)
|
||||
obj.pushKV("pingwait", stats.m_ping_wait_usec / 1e6);
|
||||
obj.pushKV("version", stats.nVersion);
|
||||
// Use the sanitized form of subver here, to avoid tricksy remote peers from
|
||||
// corrupting or modifying the JSON output by putting special characters in
|
||||
|
||||
Reference in New Issue
Block a user