Sponsored Content
Skip to content

chore: Enable clang-tidy v21 new checks - #7031

Merged
bthomee merged 8 commits into
XRPLF:developfrom
godexsoft:chore/clang-tidy-21-checks
Apr 29, 2026
Merged

chore: Enable clang-tidy v21 new checks#7031
bthomee merged 8 commits into
XRPLF:developfrom
godexsoft:chore/clang-tidy-21-checks

Conversation

@godexsoft

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR enables several checks that are new to clang-tidy 21:

  • bugprone-capturing-this-in-member-variable
  • bugprone-misleading-setter-of-reference
  • cppcoreguidelines-use-enum-class
  • modernize-use-scoped-lock
  • readability-ambiguous-smartptr-reset-call

API Impact

No impact.

@godexsoft godexsoft added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Apr 27, 2026
@codecov

codecov Bot commented Apr 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.91221% with 253 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.0%. Comparing base (46b997b) to head (d35208f).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/xrpld/overlay/detail/TrafficCount.h 51.3% 55 Missing ⚠️
src/xrpld/overlay/detail/PeerImp.cpp 0.0% 29 Missing ⚠️
src/xrpld/peerfinder/detail/Logic.h 64.7% 12 Missing ⚠️
src/xrpld/consensus/Validations.h 56.0% 11 Missing ⚠️
src/xrpld/app/misc/NetworkOPs.cpp 79.2% 10 Missing ⚠️
src/xrpld/app/ledger/detail/LedgerMaster.cpp 70.0% 9 Missing ⚠️
include/xrpl/resource/detail/Logic.h 66.7% 8 Missing ⚠️
src/xrpld/overlay/detail/OverlayImpl.cpp 52.9% 8 Missing ⚠️
src/libxrpl/nodestore/backend/RocksDBFactory.cpp 12.5% 7 Missing ⚠️
src/libxrpl/nodestore/DatabaseRotatingImp.cpp 53.8% 6 Missing ⚠️
... and 45 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #7031     +/-   ##
=========================================
- Coverage     82.1%   82.0%   -0.0%     
=========================================
  Files         1010    1010             
  Lines        75961   75994     +33     
  Branches      7392    7382     -10     
=========================================
+ Hits         62330   62350     +20     
- Misses       13631   13644     +13     
Files with missing lines Coverage Δ
include/xrpl/basics/Log.h 71.4% <ø> (ø)
include/xrpl/basics/Mutex.hpp 100.0% <ø> (ø)
include/xrpl/basics/Number.h 98.7% <100.0%> (ø)
include/xrpl/basics/SlabAllocator.h 94.3% <100.0%> (ø)
include/xrpl/basics/TaggedCache.h 100.0% <ø> (ø)
include/xrpl/basics/hardened_hash.h 100.0% <100.0%> (ø)
include/xrpl/basics/random.h 100.0% <100.0%> (ø)
include/xrpl/beast/asio/io_latency_probe.h 96.5% <100.0%> (ø)
include/xrpl/beast/utility/Journal.h 96.5% <ø> (ø)
include/xrpl/core/ClosureCounter.h 100.0% <100.0%> (ø)
... and 178 more

... and 4 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.

@godexsoft
godexsoft marked this pull request as ready for review April 27, 2026 20:28
Copilot AI review requested due to automatic review settings April 27, 2026 20:28
@godexsoft godexsoft removed the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Apr 27, 2026

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

This PR updates the codebase to comply with (and therefore enable) several new clang-tidy v21 checks by adjusting enum usage, lock types, and a few ambiguous API calls.

Changes:

  • Enable new clang-tidy 21 checks in .clang-tidy.
  • Replace many std::lock_guard usages with std::scoped_lock (including multi-mutex cases).
  • Convert multiple unscoped enums to enum class and update call sites to use scoped enumerators / explicit casts.

Reviewed changes

Copilot reviewed 258 out of 259 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.clang-tidy Enables the new clang-tidy v21 checks targeted by this PR.
include/xrpl/basics/Log.h Adds clang-tidy suppression for legacy/unscoped severity enum; adds local enum suppression.
include/xrpl/basics/Mutex.hpp Switches default lock type template parameter to std::scoped_lock.
include/xrpl/basics/Number.h Converts mantissa scale + rounding mode enums to enum class; updates internal references.
include/xrpl/basics/SlabAllocator.h Replaces lock_guard with scoped_lock.
include/xrpl/basics/TaggedCache.h Updates lock type in helper signatures to std::scoped_lock.
include/xrpl/beast/asio/io_latency_probe.h Replaces lock_guard with scoped_lock throughout.
include/xrpl/beast/test/yield_to.h Replaces lock_guard with scoped_lock.
include/xrpl/beast/unit_test/match.h Converts selector mode enum to enum class; updates all mode comparisons/constructors.
include/xrpl/beast/unit_test/reporter.h Adds clang-tidy suppression for local anonymous enum constant.
include/xrpl/beast/unit_test/runner.h Replaces lock_guard with scoped_lock.
include/xrpl/beast/unit_test/suite.h Converts abort_t to enum class; updates defaults and comparisons.
include/xrpl/beast/utility/Journal.h Adds clang-tidy suppression for widely-used unscoped severity enum.
include/xrpl/core/Coro.ipp Replaces lock_guard with scoped_lock.
include/xrpl/core/ClosureCounter.h Replaces lock_guard with scoped_lock.
include/xrpl/core/Job.h Adds clang-tidy suppression for protocol-wide unscoped JobType enum.
include/xrpl/core/PeerReservationTable.h Replaces lock_guard with scoped_lock.
include/xrpl/core/detail/semaphore.h Replaces lock_guard with scoped_lock.
include/xrpl/json/Writer.h Converts Writer::CollectionType to enum class.
include/xrpl/json/json_reader.h Adds clang-tidy suppression for unscoped TokenType enum used widely.
include/xrpl/json/json_value.h Adds clang-tidy suppressions for unscoped JSON enums relied on broadly.
include/xrpl/ledger/ApplyView.h Adds clang-tidy suppression for bitwise ApplyFlags enum.
include/xrpl/ledger/PendingSaves.h Replaces lock_guard with scoped_lock.
include/xrpl/ledger/helpers/LendingHelpers.h Updates rounding mode usage to new scoped Number::rounding_mode.
include/xrpl/ledger/helpers/TokenHelpers.h Converts Freeze/Auth/Spendable handling enums to enum class; updates defaults.
include/xrpl/nodestore/NodeObject.h Converts NodeObjectType to enum class.
include/xrpl/nodestore/Types.h Converts NodeStore Status to enum class; retains custom-code pattern.
include/xrpl/nodestore/detail/codec.h Updates NodeObjectType serialization to use explicit casts.
include/xrpl/protocol/ErrorCodes.h Adds clang-tidy suppressions for protocol-wide unscoped error/warning code enums.
include/xrpl/protocol/LedgerFormats.h Adds clang-tidy suppressions for protocol-wide and bitmask enums.
include/xrpl/protocol/MultiApiJson.h Converts IsMemberResult to enum class; scopes return values.
include/xrpl/protocol/Permissions.h Adds clang-tidy suppressions where macro/preprocessor tricks require unscoped enums.
include/xrpl/protocol/SField.h Adds clang-tidy suppressions for infrastructure enums and local constant enums.
include/xrpl/protocol/SOTemplate.h Adds clang-tidy suppressions/comments for widely-used protocol enums and DSL-parsed enums.
include/xrpl/protocol/STAmount.h Updates mantissa scale comparisons to scoped mantissa enum.
include/xrpl/protocol/STBase.h Adds clang-tidy suppression for bitwise JsonOptions values enum.
include/xrpl/protocol/STObject.h Converts WhichFields to enum class; updates helper calls and comments.
include/xrpl/protocol/STPathSet.h Adds clang-tidy suppression for bitmask path element type enum.
include/xrpl/protocol/SeqProxy.h Converts SeqProxy::Type to enum class; updates predicates.
include/xrpl/protocol/TER.h Adds clang-tidy suppressions for protocol-critical unscoped TER code enums.
include/xrpl/protocol/TxFormats.h Adds clang-tidy suppression for protocol-critical TxType enum.
include/xrpl/resource/Disposition.h Converts Disposition to enum class.
include/xrpl/resource/detail/Entry.h Updates Kind comparisons to scoped enum class.
include/xrpl/resource/detail/Kind.h Converts Kind to enum class.
include/xrpl/resource/detail/Tuning.h Adds clang-tidy suppression for anonymous enum constants.
include/xrpl/server/LoadFeeTrack.h Replaces lock_guard with scoped_lock across accessors/mutators.
include/xrpl/server/detail/BaseHTTPPeer.h Replaces lock_guard with scoped_lock; uses multi-mutex scoped_lock.
include/xrpl/server/detail/ServerImpl.h Adds clang-tidy suppression for anonymous enum constants.
include/xrpl/server/detail/io_list.h Replaces lock_guard with scoped_lock.
include/xrpl/shamap/FullBelowCache.h Adds clang-tidy suppression for anonymous enum constants.
include/xrpl/tx/Transactor.h Adds clang-tidy suppression for widely-used unscoped enum in base class.
include/xrpl/tx/applySteps.h Converts TxConsequences::Category to enum class.
include/xrpl/tx/invariants/InvariantCheckPrivilege.h Adds clang-tidy suppression for bitwise Privilege enum.
include/xrpl/tx/invariants/MPTInvariant.h Converts Order to enum class; adjusts outstanding array sizing.
include/xrpl/tx/paths/detail/Steps.h Converts OfferCrossing to enum class.
include/xrpl/tx/paths/detail/StrandFlow.h Updates offerCrossing checks to compare against scoped OfferCrossing values.
include/xrpl/tx/transactors/account/SignerListSet.h Converts internal Operation to enum class; updates default initialization.
include/xrpl/tx/transactors/system/LedgerStateFix.h Converts FixType to enum class.
src/libxrpl/basics/Log.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/basics/Number.cpp Updates thread-local rounding mode init and mantissa scale logic to scoped enums.
src/libxrpl/basics/ResolverAsio.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/beast/clock/basic_seconds_clock.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/beast/insight/StatsDCollector.cpp Adds suppression for anonymous enum; replaces lock_guard with scoped_lock.
src/libxrpl/beast/utility/beast_PropertyStream.cpp Replaces multi-lock pattern with std::scoped_lock(lock_, child.lock_) and other scoped lock updates.
src/libxrpl/core/HashRouter.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/core/detail/JobQueue.cpp Replaces lock_guard with scoped_lock across queue operations.
src/libxrpl/core/detail/LoadMonitor.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/core/detail/Workers.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/crypto/csprng.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/json/Output.cpp Updates Writer root collection type usage to scoped Writer::CollectionType.
src/libxrpl/json/Writer.cpp Updates comparisons and calls for scoped Writer::CollectionType.
src/libxrpl/ledger/AcceptedLedgerTx.cpp Updates Freeze/Auth handling to scoped enum classes.
src/libxrpl/ledger/CachedView.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/ledger/Ledger.cpp Updates flushDirty node object type to NodeObjectType::....
src/libxrpl/ledger/BookListeners.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/ledger/helpers/AMMHelpers.cpp Updates rounding mode usage to scoped Number::rounding_mode.
src/libxrpl/ledger/helpers/LendingHelpers.cpp Updates rounding mode usage to scoped Number::rounding_mode.
src/libxrpl/ledger/helpers/TokenHelpers.cpp Updates Freeze/Auth/Spendable handling comparisons and defaults to scoped enums.
src/libxrpl/nodestore/BatchWriter.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/nodestore/Database.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/nodestore/DatabaseNodeImp.cpp Updates Status to scoped enum; improves logging cast.
src/libxrpl/nodestore/DatabaseRotatingImp.cpp Replaces lock_guard with scoped_lock; updates Status handling and logging cast.
src/libxrpl/nodestore/DecodedBlob.cpp Updates NodeObjectType handling to scoped enum class in parsing/switch.
src/libxrpl/nodestore/ManagerImp.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/nodestore/backend/MemoryFactory.cpp Replaces lock_guard with scoped_lock; updates Status comparisons/returns.
src/libxrpl/nodestore/backend/NullFactory.cpp Updates Status returns to scoped enum values.
src/libxrpl/nodestore/backend/NuDBFactory.cpp Updates Status usage to scoped enum values.
src/libxrpl/nodestore/backend/RocksDBFactory.cpp Updates Status usage to scoped enum values; preserves custom-code encoding with explicit casts.
src/libxrpl/protocol/AccountID.cpp Replaces lock_guard with scoped_lock for packed_spinlock usage.
src/libxrpl/protocol/Rules.cpp Updates mantissa scale selection to scoped mantissa enum.
src/libxrpl/protocol/STAmount.cpp Updates internal rounding guard usage to scoped rounding enum.
src/libxrpl/protocol/STNumber.cpp Updates mantissa scale assert to scoped mantissa enum.
src/libxrpl/protocol/STObject.cpp Updates WhichFields usage to scoped enum class.
src/libxrpl/protocol/STTx.cpp Updates SeqProxy::Type usage to scoped enum class.
src/libxrpl/resource/Consumer.cpp Updates Disposition usage to scoped enum values.
src/libxrpl/resource/ResourceManager.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/rdb/DatabaseCon.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/rdb/SociDB.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/server/InfoSub.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/server/LoadFeeTrack.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/shamap/SHAMap.cpp Updates walkSubTree NodeObjectType argument to scoped enum.
src/libxrpl/shamap/SHAMapDelta.cpp Replaces lock_guard with scoped_lock.
src/libxrpl/shamap/SHAMapInnerNode.cpp Replaces lock_guard with scoped_lock for spinlock guards.
src/libxrpl/shamap/SHAMapNodeID.cpp Adds clang-tidy suppression for anonymous enum constant.
src/libxrpl/tx/applySteps.cpp Updates TxConsequences::Category usage to scoped enum values; updates mantissa scale guard usage.
src/libxrpl/tx/invariants/AMMInvariant.cpp Updates Freeze/Auth handling to scoped enums; keeps invariants logic unchanged.
src/libxrpl/tx/invariants/InvariantCheck.cpp Updates Freeze/Auth handling to scoped enums in clawback invariant.
src/libxrpl/tx/invariants/MPTInvariant.cpp Updates Order indexing logic to use explicit casts with enum class.
src/libxrpl/tx/paths/BookStep.cpp Updates offerCrossing checks to compare against OfferCrossing::no.
src/libxrpl/tx/paths/DirectStep.cpp Updates Freeze handling to scoped enum; updates offerCrossing checks against OfferCrossing::no.
src/libxrpl/tx/paths/MPTEndpointStep.cpp Updates Freeze/Auth handling to scoped enums.
src/libxrpl/tx/paths/OfferStream.cpp Updates Freeze/Auth handling to scoped enums.
src/libxrpl/tx/paths/XRPEndpointStep.cpp Updates offerCrossing check to compare against OfferCrossing::no.
src/libxrpl/tx/transactors/account/AccountSet.cpp Updates TxConsequences category return values to scoped enum.
src/libxrpl/tx/transactors/account/SignerListSet.cpp Updates Operation handling to scoped enum values through preflight/doApply/preCompute.
src/libxrpl/tx/transactors/check/CheckCash.cpp Updates Freeze/Auth handling to scoped enums.
src/libxrpl/tx/transactors/dex/OfferCreate.cpp Updates Freeze/Auth handling to scoped enums.
src/libxrpl/tx/transactors/escrow/EscrowCreate.cpp Updates Freeze/Auth handling to scoped enums.
src/libxrpl/tx/transactors/lending/LoanBrokerCoverClawback.cpp Updates rounding and Freeze/Auth handling to scoped enums.
src/libxrpl/tx/transactors/lending/LoanBrokerCoverWithdraw.cpp Updates rounding mode usage to scoped enum.
src/libxrpl/tx/transactors/lending/LoanBrokerDelete.cpp Updates rounding mode usage to scoped enum.
src/libxrpl/tx/transactors/lending/LoanDelete.cpp Updates rounding mode usage to scoped enum.
src/libxrpl/tx/transactors/lending/LoanManage.cpp Updates rounding mode usage to scoped enum.
src/libxrpl/tx/transactors/lending/LoanPay.cpp Updates rounding/Freeze/Auth handling to scoped enums.
src/libxrpl/tx/transactors/lending/LoanSet.cpp Updates rounding mode usage to scoped enum.
src/libxrpl/tx/transactors/nft/NFTokenAcceptOffer.cpp Updates Freeze handling to scoped enum.
src/libxrpl/tx/transactors/system/LedgerStateFix.cpp Updates sfLedgerFixType comparisons/switch to use explicit cast to enum class FixType.
src/libxrpl/tx/transactors/token/Clawback.cpp Updates Freeze/Auth handling to scoped enums.
src/tests/libxrpl/basics/Mutex.cpp Renames test to reflect scoped_lock usage.
src/tests/libxrpl/json/Writer.cpp Updates tests to pass scoped Writer::CollectionType values.
src/test/app/AMM_test.cpp Updates mantissa scale / rounding enum usage to scoped values.
src/test/app/AMMExtended_test.cpp Updates mantissa scale enum usage to scoped values.
src/test/app/Delegate_test.cpp Renames macro parameter to avoid misleading setter-like reference naming; updates expected count.
src/test/app/Invariants_test.cpp Updates mantissa scale enum usage to scoped values.
src/test/app/Invariants_test.cpp Updates mantissa scale enum usage to scoped values.
src/test/app/LedgerHistory_test.cpp Updates NodeObjectType arguments to scoped enum values.
src/test/app/NFTokenBurn_test.cpp Converts Volume enum to enum class; updates comparisons.
src/test/app/NFTokenDir_test.cpp Converts Volume enum to enum class; updates comparisons; updates Account seed type usage to scoped enum.
src/test/app/Path_test.cpp Replaces lock_guard with scoped_lock.
src/test/app/XChain_test.cpp Converts state enum to enum class and scopes transitions; removes unused flag enum.
src/test/beast/beast_io_latency_probe_test.cpp Replaces lock_guard with scoped_lock.
src/test/basics/IOUAmount_test.cpp Updates mantissa scale enum usage to scoped values.
src/test/consensus/NegativeUNL_test.cpp Updates NegativeUNLModify usage to scoped enum class.
src/test/core/Coroutine_test.cpp Replaces lock_guard with scoped_lock.
src/test/core/Workers_test.cpp Replaces lock_guard with scoped_lock.
src/test/jtx/Account.h Converts AcctStringType to enum class.
src/test/jtx/CaptureLogs.h Replaces lock_guard with scoped_lock.
src/test/jtx/TestHelpers.h Replaces lock_guard with scoped_lock.
src/test/jtx/directory.h Converts Error enum to enum class.
src/test/jtx/impl/AMMTest.cpp Updates mantissa scale enum usage to scoped values.
src/test/jtx/impl/Account.cpp Updates AcctStringType comparisons and calls to use scoped enum values.
src/test/jtx/impl/WSClient.cpp Replaces lock_guard with scoped_lock.
src/test/jtx/impl/directory.cpp Updates Error enum values to scoped enum class references.
src/test/jtx/impl/ledgerStateFixes.cpp Adds <cstdint>; updates LedgerStateFix::FixType JSON encoding with explicit cast.
src/test/nodestore/TestBase.h Updates NodeObjectType and Status usage to scoped enum values.
src/test/nodestore/Timing_test.cpp Updates abort enum usage; adds clang-tidy suppressions for local enums.
src/test/nodestore/import_test.cpp Updates abort enum usage to scoped enum class.
src/test/overlay/TMGetObjectByHash_test.cpp Updates NodeObjectType store call to scoped enum value.
src/test/overlay/reduce_relay_test.cpp Converts local enums to enum class; scopes map keys.
src/test/overlay/short_read_test.cpp Replaces lock_guard with scoped_lock.
src/test/protocol/MultiApiJson_test.cpp Updates IsMemberResult comparisons to scoped enum class.
src/test/protocol/STNumber_test.cpp Updates rounding/mantissa scale usage to scoped enums.
src/test/protocol/SeqProxy_test.cpp Updates SeqProxy::Type usage to scoped enum class.
src/test/resource/Logic_test.cpp Updates Disposition comparisons to scoped enum values.
src/test/shamap/FetchPack_test.cpp Adds clang-tidy suppression for local enum constants.
src/test/shamap/common.h Resolves ambiguous smartptr reset call by explicitly dereferencing before .reset().
src/test/unit_test/SuiteJournal.h Replaces lock_guard with scoped_lock.
src/test/unit_test/multi_runner.cpp Replaces lock_guard with scoped_lock.
src/test/unit_test/multi_runner.h Adds clang-tidy suppression for local enum constant.
src/xrpld/app/consensus/RCLConsensus.cpp Replaces lock_guard with scoped_lock.
src/xrpld/app/consensus/RCLConsensus.h Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/AccountStateSF.cpp Updates NodeObjectType store call to scoped enum value.
src/xrpld/app/ledger/LedgerHolder.h Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/LedgerMaster.h Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/LedgerReplayer.h Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/OpenLedger.h Converts Result enum to enum class.
src/xrpld/app/ledger/TransactionStateSF.cpp Updates NodeObjectType store call to scoped enum value.
src/xrpld/app/ledger/detail/BuildLedger.cpp Updates flushDirty NodeObjectType args to scoped enum values.
src/xrpld/app/ledger/detail/InboundLedger.cpp Updates NodeObjectType store calls to scoped enum values; replaces lock_guard with scoped_lock for received data lock.
src/xrpld/app/ledger/detail/InboundLedgers.cpp Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/detail/InboundTransactions.cpp Adds enum suppression; replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/detail/LedgerCleaner.cpp Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/detail/LedgerReplayer.cpp Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/detail/LedgerToJson.cpp Updates FreezeHandling usage to scoped enum value.
src/xrpld/app/ledger/detail/LocalTxs.cpp Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/detail/OpenLedger.cpp Replaces lock_guard with scoped_lock for internal mutexes.
src/xrpld/app/ledger/detail/OrderBookDBImpl.cpp Replaces lock_guard with scoped_lock.
src/xrpld/app/ledger/detail/TransactionAcquire.cpp Adds clang-tidy suppression for anonymous enum constants.
src/xrpld/app/ledger/detail/TransactionMaster.cpp Updates TransStatus usage to scoped enum values.
src/xrpld/app/main/Application.cpp Updates flushDirty NodeObjectType argument to scoped enum value.
src/xrpld/app/main/LoadManager.cpp Replaces lock_guard with scoped_lock.
src/xrpld/app/main/Main.cpp Updates selector mode to scoped mode_t::automatch.
src/xrpld/app/misc/NegativeUNLVote.cpp Updates NegativeUNLModify and locking usage to scoped enums / scoped_lock.
src/xrpld/app/misc/NegativeUNLVote.h Converts NegativeUNLModify to enum class.
src/xrpld/app/misc/SHAMapStoreImp.h Converts HealthResult to enum class; updates comparisons.
src/xrpld/app/misc/Transaction.cpp Updates TransStatus usage to scoped enum values in constructor and status mapping.
src/xrpld/app/misc/Transaction.h Converts TransStatus to enum class; updates member default initialization.
src/xrpld/app/misc/TxQ.h Updates internal lock parameter types to std::scoped_lock.
src/xrpld/app/misc/ValidatorList.h Replaces lock_guard alias with scoped_lock alias; updates private helper signatures.
src/xrpld/app/misc/ValidatorSite.h Updates internal helper lock parameter types to std::scoped_lock.
src/xrpld/app/misc/detail/ValidatorList.cpp Replaces lock_guard with scoped_lock; updates helper function signatures accordingly.
src/xrpld/app/rdb/backend/detail/Node.cpp Updates NodeObjectType store call to scoped enum value.
src/xrpld/consensus/Consensus.h Updates AvalancheState usage to scoped enum values in members and initialization.
src/xrpld/consensus/ConsensusParms.h Converts AvalancheState to enum class; updates map initialization and next-state wiring.
src/xrpld/consensus/DisputedTx.h Updates AvalancheState initialization to scoped enum value.
src/xrpld/overlay/detail/Cluster.cpp Replaces lock_guard with scoped_lock.
src/xrpld/overlay/detail/Message.cpp Adds explicit cast for category index storage.
src/xrpld/overlay/detail/OverlayImpl.h Replaces lock_guard with scoped_lock.
src/xrpld/overlay/detail/PeerImp.h Replaces lock_guard with scoped_lock; updates lock-parameter reminder type.
src/xrpld/overlay/detail/PeerReservationTable.cpp Replaces lock_guard with scoped_lock.
src/xrpld/overlay/detail/TxMetrics.cpp Replaces lock_guard with scoped_lock.
src/xrpld/overlay/detail/Tuning.h Adds clang-tidy suppression for anonymous enum constants.
src/xrpld/peerfinder/Slot.h Converts Slot::State to enum class.
src/xrpld/peerfinder/detail/Checker.h Replaces lock_guard with scoped_lock.
src/xrpld/peerfinder/detail/Counts.h Updates Slot::State comparisons/switch cases to scoped enum values.
src/xrpld/peerfinder/detail/PeerfinderManager.cpp Replaces lock_guard with scoped_lock.
src/xrpld/peerfinder/detail/SlotImp.cpp Updates SlotImp state initialization and assertions to scoped enum values.
src/xrpld/peerfinder/detail/StoreSqdb.h Adds clang-tidy suppression for anonymous enum constant.
src/xrpld/peerfinder/detail/Tuning.h Adds clang-tidy suppression for anonymous enum constants.
src/xrpld/rpc/detail/AssetCache.cpp Replaces lock_guard with scoped_lock.
src/xrpld/rpc/detail/Handler.h Adds clang-tidy suppression for bitwise Condition enum.
src/xrpld/rpc/detail/PathRequest.cpp Replaces lock_guard with scoped_lock.
src/xrpld/rpc/detail/PathRequestManager.cpp Replaces lock_guard with scoped_lock.
src/xrpld/rpc/detail/Pathfinder.h Converts NodeType and PaymentType to enum class.
src/xrpld/rpc/detail/RPCSub.cpp Replaces lock_guard with scoped_lock.
src/xrpld/rpc/detail/ServerHandler.cpp Replaces lock_guard with scoped_lock.
src/xrpld/rpc/detail/TransactionSign.cpp Updates TransStatus comparison to scoped enum value.
src/xrpld/rpc/handlers/transaction/Submit.cpp Updates TransStatus comparison to scoped enum value.
src/xrpld/shamap/NodeFamily.cpp Replaces lock_guard with scoped_lock; clarifies pointee reset vs smartptr reset.

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

@github-actions

Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.


/** The types of node objects. */
enum NodeObjectType : std::uint32_t {
enum class NodeObjectType : std::uint32_t {

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.

Do you think it is possible to change this to a std::uint8_t so things like:

write<std::uint8_t>(os, static_cast<std::uint8_t>(NodeObjectType::hotUNKNOWN));

can be simplified? There are only 4 valid values used, plus the dummy but that could be given a different value (maybe).

Naturally if possible, the change would be in a separate PR. However, I'm curious as it doesn't seem to make much sense to have this be a 32-bit number.

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.

Yeah, i think it could be but we need to carefully test it. I guess when it was written uint8_t was not a thing yet.

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.

Would you be able to create a ticket for it so we don't forget?

Comment thread src/test/app/Delegate_test.cpp
@github-actions

Copy link
Copy Markdown

All conflicts have been resolved. Assigned reviewers can now start or resume their review.

@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 Apr 29, 2026
@bthomee
bthomee enabled auto-merge April 29, 2026 14:58
@bthomee
bthomee added this pull request to the merge queue Apr 29, 2026
Merged via the queue into XRPLF:develop with commit f7275b7 Apr 29, 2026
2 of 3 checks passed
marek-foss-neti pushed a commit to marek-foss-neti/rippled that referenced this pull request May 5, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants