From 2a46f220cad3f30f6f5348dadbf76b3875fe050a Mon Sep 17 00:00:00 2001 From: 0xb10c Date: Mon, 4 Aug 2025 16:20:05 +0200 Subject: [PATCH 1/2] rpc: fix getpeerinfo ping duration unit docs The getpeerinfo docs incorrectly specified the ping durations as milliseconds. This was incorrectly changed in a3789c700b5a43efd4b366b4241ae840d63f2349 (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. Github-Pull: #33133 Rebased-From: 1252eeb997df2eb12c33d92eb1a5c9d6643a67ff --- src/rpc/net.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 1119a3e668e..267513dfe37 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -80,7 +80,7 @@ static RPCHelpMan ping() { return RPCHelpMan{"ping", "\nRequests that a ping be sent to all other nodes, to measure ping time.\n" - "Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds.\n" + "Results are provided in getpeerinfo.\n" "Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.\n", {}, RPCResult{RPCResult::Type::NONE, "", ""}, @@ -145,9 +145,9 @@ static RPCHelpMan getpeerinfo() {RPCResult::Type::NUM, "bytesrecv", "The total bytes received"}, {RPCResult::Type::NUM_TIME, "conntime", "The " + UNIX_EPOCH_TIME + " of the connection"}, {RPCResult::Type::NUM, "timeoffset", "The time offset in seconds"}, - {RPCResult::Type::NUM, "pingtime", /*optional=*/true, "The last ping time in milliseconds (ms), if any"}, - {RPCResult::Type::NUM, "minping", /*optional=*/true, "The minimum observed ping time in milliseconds (ms), if any"}, - {RPCResult::Type::NUM, "pingwait", /*optional=*/true, "The duration in milliseconds (ms) of an outstanding ping (if non-zero)"}, + {RPCResult::Type::NUM, "pingtime", /*optional=*/true, "The last ping time in seconds, if any"}, + {RPCResult::Type::NUM, "minping", /*optional=*/true, "The minimum observed ping time in seconds, if any"}, + {RPCResult::Type::NUM, "pingwait", /*optional=*/true, "The duration in seconds of an outstanding ping (if non-zero)"}, {RPCResult::Type::NUM, "version", "The peer version, such as 70001"}, {RPCResult::Type::STR, "subver", "The string version"}, {RPCResult::Type::BOOL, "inbound", "Inbound (true) or Outbound (false)"}, From 9f1b89a1c79fe50fb425b68320851ad3381032c7 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 6 Aug 2025 11:58:00 +0100 Subject: [PATCH 2/2] doc: update release notes for 28.x --- doc/release-notes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 6a17306b329..ed7f3956d13 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -53,12 +53,13 @@ Notable changes - #32776 doc: taproot became always active in v24.0 - #32777 doc: fix Transifex 404s - #33070 doc/zmq: fix unix socket path example - +- #33133 rpc: fix getpeerinfo ping duration unit docs Credits ======= Thanks to everyone who directly contributed to this release: +- 0xB10C - fanquake - Hennadii Stepanov - MarcoFalke