Skip to content

Commit 1252eeb

Browse files
committed
rpc: fix getpeerinfo ping duration unit docs
The getpeerinfo docs incorrectly specified the ping durations as milliseconds. This was incorrectly changed in a3789c7 (released in v25; master since Sept. 2022). The correct duration unit is seconds. Also, remove the documentation of the getpeerinfo RPC response from the ping RPC since it's incomplete. Better to just reference the getpeerinfo RPC and it's documenation for this.
1 parent 0cb1ed2 commit 1252eeb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rpc/net.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static RPCHelpMan ping()
8585
return RPCHelpMan{
8686
"ping",
8787
"Requests that a ping be sent to all other nodes, to measure ping time.\n"
88-
"Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.\n"
88+
"Results are provided in getpeerinfo.\n"
8989
"Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.\n",
9090
{},
9191
RPCResult{RPCResult::Type::NONE, "", ""},
@@ -150,9 +150,9 @@ static RPCHelpMan getpeerinfo()
150150
{RPCResult::Type::NUM, "bytesrecv", "The total bytes received"},
151151
{RPCResult::Type::NUM_TIME, "conntime", "The " + UNIX_EPOCH_TIME + " of the connection"},
152152
{RPCResult::Type::NUM, "timeoffset", "The time offset in seconds"},
153-
{RPCResult::Type::NUM, "pingtime", /*optional=*/true, "The last ping time in milliseconds (ms), if any"},
154-
{RPCResult::Type::NUM, "minping", /*optional=*/true, "The minimum observed ping time in milliseconds (ms), if any"},
155-
{RPCResult::Type::NUM, "pingwait", /*optional=*/true, "The duration in milliseconds (ms) of an outstanding ping (if non-zero)"},
153+
{RPCResult::Type::NUM, "pingtime", /*optional=*/true, "The last ping time in seconds, if any"},
154+
{RPCResult::Type::NUM, "minping", /*optional=*/true, "The minimum observed ping time in seconds, if any"},
155+
{RPCResult::Type::NUM, "pingwait", /*optional=*/true, "The duration in seconds of an outstanding ping (if non-zero)"},
156156
{RPCResult::Type::NUM, "version", "The peer version, such as 70001"},
157157
{RPCResult::Type::STR, "subver", "The string version"},
158158
{RPCResult::Type::BOOL, "inbound", "Inbound (true) or Outbound (false)"},

0 commit comments

Comments
 (0)