From 4bbe28cb92eff50a4f9874d5e7a76844aacc9d1f Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Wed, 13 May 2026 12:11:52 +0100 Subject: [PATCH 1/2] fix(consensus): restore DisputedTx getYays/getNays accessors Consensus.h (Phase 4 tracing) depends on DisputedTx::getYays()/getNays() to build disputeResolve span events. Both accessors were removed by earlier 'duplicate accessor' cleanup commits on this branch, leaving Consensus.h referencing non-existent members. CI caught this on macOS/clang-17/gcc-13/Windows builds. Restore the accessors on the branch where they were dropped so downstream phase branches inherit a compiling DisputedTx.h via merge. Co-Authored-By: Claude Opus 4.7 --- src/xrpld/consensus/DisputedTx.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/xrpld/consensus/DisputedTx.h b/src/xrpld/consensus/DisputedTx.h index aff4ccae68..97cd766eb1 100644 --- a/src/xrpld/consensus/DisputedTx.h +++ b/src/xrpld/consensus/DisputedTx.h @@ -60,6 +60,20 @@ public: return ourVote_; } + //! Number of peers voting to include the transaction. + [[nodiscard]] int + getYays() const + { + return yays_; + } + + //! Number of peers voting to exclude the transaction. + [[nodiscard]] int + getNays() const + { + return nays_; + } + //! Are we and our peers "stalled" where we probably won't change //! our vote? [[nodiscard]] bool From 25d2dae798780a31eb1fc01e2e97867c73a05d56 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Wed, 13 May 2026 12:12:59 +0100 Subject: [PATCH 2/2] fix(tests): align MockServiceRegistry overrides with ServiceRegistry interface MockServiceRegistry in MetricsRegistry.cpp still used the old method names (timeKeeper, cachedSLEs, validators, overlay, cluster, app, etc.) while ServiceRegistry has been standardized on getXxx()/isXxx() forms. Windows CI caught this as C3668 "did not override any base class methods" errors and C2259 "cannot instantiate abstract class". Rename all 13 mismatched overrides to match the current interface: timeKeeper -> getTimeKeeper cachedSLEs -> getCachedSLEs validators -> getValidators validatorSites -> getValidatorSites validatorManifests -> getValidatorManifests publisherManifests -> getPublisherManifests overlay -> getOverlay cluster -> getCluster peerReservations -> getPeerReservations pendingSaves -> getPendingSaves openLedger (x2) -> getOpenLedger getPathRequests -> getPathRequestManager (type rename too) journal -> getJournal logs -> getLogs trapTxID -> getTrapTxID app -> getApp Also regenerate levelization ordering.txt to reflect the new tests.libxrpl -> xrpl.core edge introduced by ServiceRegistry.h include. Co-Authored-By: Claude Opus 4.7 --- .../scripts/levelization/results/ordering.txt | 1 + .../libxrpl/telemetry/MetricsRegistry.cpp | 36 +++++++++---------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/scripts/levelization/results/ordering.txt b/.github/scripts/levelization/results/ordering.txt index 0ba8d5f4ce..6c94d5a2cd 100644 --- a/.github/scripts/levelization/results/ordering.txt +++ b/.github/scripts/levelization/results/ordering.txt @@ -191,6 +191,7 @@ test.toplevel > xrpl.json test.unit_test > xrpl.basics test.unit_test > xrpl.protocol tests.libxrpl > xrpl.basics +tests.libxrpl > xrpl.core tests.libxrpl > xrpld.telemetry tests.libxrpl > xrpl.json tests.libxrpl > xrpl.net diff --git a/src/tests/libxrpl/telemetry/MetricsRegistry.cpp b/src/tests/libxrpl/telemetry/MetricsRegistry.cpp index 2e11d37819..dd46824074 100644 --- a/src/tests/libxrpl/telemetry/MetricsRegistry.cpp +++ b/src/tests/libxrpl/telemetry/MetricsRegistry.cpp @@ -56,7 +56,7 @@ public: throwUnimplemented(); } TimeKeeper& - timeKeeper() override + getTimeKeeper() override { throwUnimplemented(); } @@ -71,7 +71,7 @@ public: throwUnimplemented(); } CachedSLEs& - cachedSLEs() override + getCachedSLEs() override { throwUnimplemented(); } @@ -106,37 +106,37 @@ public: throwUnimplemented(); } ValidatorList& - validators() override + getValidators() override { throwUnimplemented(); } ValidatorSite& - validatorSites() override + getValidatorSites() override { throwUnimplemented(); } ManifestCache& - validatorManifests() override + getValidatorManifests() override { throwUnimplemented(); } ManifestCache& - publisherManifests() override + getPublisherManifests() override { throwUnimplemented(); } Overlay& - overlay() override + getOverlay() override { throwUnimplemented(); } Cluster& - cluster() override + getCluster() override { throwUnimplemented(); } PeerReservationTable& - peerReservations() override + getPeerReservations() override { throwUnimplemented(); } @@ -191,17 +191,17 @@ public: throwUnimplemented(); } PendingSaves& - pendingSaves() override + getPendingSaves() override { throwUnimplemented(); } OpenLedger& - openLedger() override + getOpenLedger() override { throwUnimplemented(); } OpenLedger const& - openLedger() const override + getOpenLedger() const override { throwUnimplemented(); } @@ -225,8 +225,8 @@ public: { throwUnimplemented(); } - PathRequests& - getPathRequests() override + PathRequestManager& + getPathRequestManager() override { throwUnimplemented(); } @@ -256,7 +256,7 @@ public: return false; } beast::Journal - journal(std::string const&) override + getJournal(std::string const&) override { return beast::Journal(beast::Journal::getNullSink()); } @@ -266,12 +266,12 @@ public: throwUnimplemented(); } Logs& - logs() override + getLogs() override { throwUnimplemented(); } std::optional const& - trapTxID() const override + getTrapTxID() const override { static std::optional const empty; return empty; @@ -282,7 +282,7 @@ public: throwUnimplemented(); } Application& - app() override + getApp() override { throwUnimplemented(); }