From cc0f70432ad30cf8adc62102b18f40d4c48ea8d6 Mon Sep 17 00:00:00 2001 From: Bart <11445373+bthomee@users.noreply.github.com> Date: Fri, 18 Sep 2026 19:36:51 +0200 Subject: [PATCH] test: Drop the stale entry-count note from newestSupportedProtocolVersion Addresses a Copilot review nit on PR 8246: the comment's first two sentences already explain why max_element is used over reading the last entry. The trailing entry count added nothing to that and would go stale the moment a third protocol version is added. --- src/xrpld/overlay/detail/ProtocolVersion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrpld/overlay/detail/ProtocolVersion.cpp b/src/xrpld/overlay/detail/ProtocolVersion.cpp index a6414cf751..4772200c8b 100644 --- a/src/xrpld/overlay/detail/ProtocolVersion.cpp +++ b/src/xrpld/overlay/detail/ProtocolVersion.cpp @@ -156,7 +156,7 @@ newestSupportedProtocolVersion() { // The list above is sorted, so this could read its last entry instead. It // scans for the maximum so that it stays correct on its own, rather than on - // an invariant a separate static_assert keeps. The list holds two entries. + // an invariant a separate static_assert keeps. return *std::ranges::max_element(kSupportedProtocolList); }