aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
diff options
context:
space:
mode:
authorBen Woosley <[email protected]>2020-03-03 08:35:01 -0500
committerBen Woosley <[email protected]>2020-03-04 13:44:25 -0500
commitb054c46977667953593819248c167545aa3e7a40 (patch)
tree229182b06f83362f065d920e9accb1fbe4741393 /src/rpc/net.cpp
parentMerge #18168: httpserver: use own HTTP status codes (diff)
downloaddiscoin-b054c46977667953593819248c167545aa3e7a40.tar.xz
discoin-b054c46977667953593819248c167545aa3e7a40.zip
refactor: Convert ping time from double to int64_t
Diffstat (limited to 'src/rpc/net.cpp')
-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 92542539d..628e85ce0 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -165,8 +165,8 @@ static UniValue getpeerinfo(const JSONRPCRequest& request)
obj.pushKV("bytesrecv", stats.nRecvBytes);
obj.pushKV("conntime", stats.nTimeConnected);
obj.pushKV("timeoffset", stats.nTimeOffset);
- if (stats.dPingTime > 0.0)
- obj.pushKV("pingtime", stats.dPingTime);
+ 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.dPingWait > 0.0)