Sponsored Content
Skip to content

chore: More fixes for bad renames - #7092

Merged
bthomee merged 1 commit into
XRPLF:developfrom
godexsoft:chore/clang-tidy-fix-bad-renames
May 7, 2026
Merged

chore: More fixes for bad renames#7092
bthomee merged 1 commit into
XRPLF:developfrom
godexsoft:chore/clang-tidy-fix-bad-renames

Conversation

@godexsoft

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Follow up to #7091 fixing more findings.
Also renames "Io" to "IO" in some cases where it makes sense.

API Impact

No impact.

Copilot AI review requested due to automatic review settings May 7, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Follow-up cleanup to revert/standardize a set of prior “bad renames” by aligning identifiers (and many diagnostic/assert strings) with the current function/type names, including several IoIO and *_snake_casecamelCase adjustments.

Changes:

  • Standardize diagnostic strings in XRPL_ASSERT / UNREACHABLE to match current symbol names (e.g., onEndpoints, toString, doResolve).
  • Rename core types from BaseUintBaseUInt and Io*IO* across headers and tests.
  • Align gRPC secure gateway messages with the secure_gateway config naming.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/xrpld/peerfinder/detail/Logic.h Update XRPL_ASSERT context strings to onEndpoints.
src/xrpld/peerfinder/detail/Livecache.h Update XRPL_ASSERT context strings for HopsT.
src/xrpld/peerfinder/detail/Handouts.h Update XRPL_ASSERT context string to handoutOne.
src/xrpld/peerfinder/detail/Bootcache.cpp Update XRPL_ASSERT context strings to onSuccess/onFailure.
src/xrpld/overlay/detail/OverlayImpl.cpp Update XRPL_ASSERT context strings to addActive.
src/xrpld/overlay/detail/Handshake.cpp Rename BaseUint<512> usage to BaseUInt<512> for SSL message hashing.
src/xrpld/app/rdb/backend/detail/Node.cpp Update UNREACHABLE context string to toString.
src/xrpld/app/main/GRPCServer.cpp Align log/exception messages to secure_gateway config naming.
src/xrpld/app/main/Application.cpp Rename IoLatencySamplerIOLatencySampler and probe type to IOLatencyProbe.
src/test/protocol/STIssue_test.cpp Update tests to use BaseUInt instead of BaseUint.
src/test/beast/beast_io_latency_probe_test.cpp Update test probe type to IOLatencyProbe.
src/test/basics/base_uint_test.cpp Update base uint tests to BaseUInt and related helper names.
src/test/app/Vault_test.cpp Update BaseUint<256> usage in test transaction fields to BaseUInt<256>.
src/test/app/MultiSign_test.cpp Update BaseUint<256>::fromVoid usage to BaseUInt<256>::fromVoid.
src/libxrpl/tx/applySteps.cpp Update UNREACHABLE context strings to invokePre*/invokeApply.
src/libxrpl/server/Port.cpp Change printed label to secure_gateway nets:.
src/libxrpl/protocol/Quality.cpp Update XRPL_ASSERT context strings to ceilInImpl/ceilOutImpl/composedQuality.
src/libxrpl/protocol/Indexes.cpp Update XRPL_ASSERT context string to NextT::operator().
src/libxrpl/ledger/Dir.cpp Update XRPL_ASSERT context strings to Dir::ConstIterator methods; minor formatting.
src/libxrpl/beast/clock/basic_seconds_clock.cpp Update XRPL_ASSERT context string to SecondsClockThread dtor.
src/libxrpl/basics/ResolverAsio.cpp Update XRPL_ASSERT context strings to doStop/doResolve.
src/libxrpl/basics/Log.cpp Update UNREACHABLE context string to Logs::toString.
include/xrpl/shamap/SHAMapItem.h Update XRPL_ASSERT context string to makeShamapitem.
include/xrpl/shamap/SHAMap.h Update XRPL_ASSERT context string to SHAMap::ConstIterator.
include/xrpl/server/detail/ServerImpl.h Rename member/accessor types from IoList to IOList.
include/xrpl/server/detail/io_list.h Rename IoList to IOList and update related references/messages.
include/xrpl/server/detail/Door.h Update inheritance from IoList::Work to IOList::Work.
include/xrpl/server/detail/BasePeer.h Update inheritance from IoList::Work to IOList::Work.
include/xrpl/server/detail/BaseHTTPPeer.h Update inheritance from IoList::Work to IOList::Work.
include/xrpl/protocol/UintTypes.h Update core protocol typedefs to use BaseUInt.
include/xrpl/protocol/STObject.h Update setFieldH160 signature/definition to use BaseUInt.
include/xrpl/protocol/STBitString.h Update value_type/setValue to use BaseUInt.
include/xrpl/protocol/Serializer.h Update bitstring serialize/parse templates to use BaseUInt.
include/xrpl/protocol/AccountID.h Update AccountID typedef to use BaseUInt.
include/xrpl/beast/container/detail/aged_unordered_container.h Update XRPL_ASSERT context string to maybeRehash.
include/xrpl/beast/asio/io_latency_probe.h Rename IoLatencyProbe to IOLatencyProbe and update messages/assert strings.
include/xrpl/basics/spinlock.h Update XRPL_ASSERT context string to PackedSpinlock.
include/xrpl/basics/scope.h Update XRPL_ASSERT context string to ScopeUnlock.
include/xrpl/basics/safe_cast.h Update XRPL_ASSERT context strings to safeDowncast.
include/xrpl/basics/random.h Update XRPL_ASSERT context string to randInt.
include/xrpl/basics/partitioned_unordered_map.h Update XRPL_ASSERT context string to PartitionedUnorderedMap.
include/xrpl/basics/base_uint.h Rename BaseUint to BaseUInt, update operators/helpers and associated typedefs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -62,7 +62,7 @@ struct IsContiguousContainer<Slice> : std::true_type
number of bits.
*/
template <std::size_t Bits, class Tag = void>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are a little bit past this stage with breaking changes 🏴‍☠️

Comment on lines 14 to 26
@@ -21,22 +21,22 @@ class IoList final
void
destroy();

friend class IoList;
IoList* ios_ = nullptr;
friend class IOList;
IOList* ios_ = nullptr;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same story

Comment on lines 16 to 40
@@ -30,12 +30,12 @@ class IoLatencyProbe
bool cancel_{false};

public:
IoLatencyProbe(duration const& period, boost::asio::io_context& ios)
IOLatencyProbe(duration const& period, boost::asio::io_context& ios)
: period_(period), ios_(ios), timer_(ios_)
{
}

~IoLatencyProbe()
~IOLatencyProbe()
{
std::unique_lock<decltype(mutex_)> lock(mutex_);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And again

@godexsoft godexsoft added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label May 7, 2026
@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.1%. Comparing base (d67e061) to head (891cc9f).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
include/xrpl/basics/base_uint.h 90.0% 3 Missing ⚠️
src/xrpld/app/main/GRPCServer.cpp 0.0% 3 Missing ⚠️
src/libxrpl/ledger/Dir.cpp 50.0% 2 Missing ⚠️
src/libxrpl/protocol/Indexes.cpp 0.0% 1 Missing ⚠️
src/xrpld/overlay/detail/Handshake.cpp 0.0% 1 Missing ⚠️
src/xrpld/peerfinder/detail/Handouts.h 0.0% 1 Missing ⚠️
src/xrpld/peerfinder/detail/Logic.h 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #7092   +/-   ##
=======================================
  Coverage     82.1%   82.1%           
=======================================
  Files         1010    1010           
  Lines        76023   76040   +17     
  Branches      7368    7370    +2     
=======================================
+ Hits         62403   62417   +14     
- Misses       13620   13623    +3     
Files with missing lines Coverage Δ
include/xrpl/basics/partitioned_unordered_map.h 100.0% <ø> (ø)
include/xrpl/basics/random.h 100.0% <100.0%> (ø)
include/xrpl/basics/safe_cast.h 88.9% <100.0%> (ø)
include/xrpl/basics/scope.h 100.0% <100.0%> (ø)
include/xrpl/basics/spinlock.h 93.3% <ø> (ø)
include/xrpl/beast/asio/io_latency_probe.h 97.6% <100.0%> (ø)
.../beast/container/detail/aged_unordered_container.h 96.1% <ø> (ø)
include/xrpl/protocol/AccountID.h 61.5% <ø> (ø)
include/xrpl/protocol/STBitString.h 100.0% <100.0%> (ø)
include/xrpl/protocol/STObject.h 93.7% <100.0%> (ø)
... and 27 more

... and 7 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread include/xrpl/basics/safe_cast.h
Comment thread include/xrpl/basics/safe_cast.h
XRPL_ASSERT(
loadFactor() <= maxLoadFactor(),
"beast::detail::AgedUnorderedContainer::maybe_rehash : maximum "
"beast::detail::AgedUnorderedContainer::maybeRehash : maximum "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall that in the previous PR it was pointed out that certain names had to be maintained with underscores, and I thought that included the various Beast containers and some of the overriding functions.

Should AgedUnorderedContainer remain as-is, or should that be restored to aged_unordered_container that it was in the past, and similarly for maybeRehash back to maybe_rehash?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not. Everything that needed to stay, stayed to make things compile. Everything that could be renamed got renamed. Seems to work

@godexsoft godexsoft added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label May 7, 2026
@bthomee
bthomee added this pull request to the merge queue May 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 7, 2026
@bthomee
bthomee added this pull request to the merge queue May 7, 2026
Merged via the queue into XRPLF:develop with commit 7afdd71 May 7, 2026
3 checks passed
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants