aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2020-03-03 08:40:29 -0500
committerBen Woosley <ben.woosley@gmail.com>2020-03-04 13:44:57 -0500
commite6fc63ec7ee637a4b533e4d7b22def05e74e1dff (patch)
tree5025327bd248217f69964ac90dfe182a7e181012 /src/rpc
parentb054c46977667953593819248c167545aa3e7a40 (diff)
downloadbitcoin-e6fc63ec7ee637a4b533e4d7b22def05e74e1dff.tar.xz
refactor: Convert min ping time from double to int64_t
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 628e85ce01..c1b350526d 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -167,8 +167,8 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
obj.pushKV("timeoffset", stats.nTimeOffset);
if (stats.m_ping_usec > 0)
obj.pushKV("pingtime", stats.m_ping_usec / 1e6);
- if (stats.dMinPing < static_cast<double>(std::numeric_limits<int64_t>::max())/1e6)
- obj.pushKV("minping", stats.dMinPing);
+ 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);
obj.pushKV("version", stats.nVersion);