aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2020-03-03 08:42:50 -0500
committerBen Woosley <ben.woosley@gmail.com>2020-03-04 13:45:29 -0500
commit7a810b1d7a9d03818706dc94457dc3255f062796 (patch)
tree6879f95472c704bc48e85beaca23b91b330f1c46 /src/rpc/net.cpp
parente6fc63ec7ee637a4b533e4d7b22def05e74e1dff (diff)
downloadbitcoin-7a810b1d7a9d03818706dc94457dc3255f062796.tar.xz
refactor: Convert ping wait 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 c1b350526d..e8ae458c57 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -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