diff --git a/include/xrpl/protocol/README.md b/include/xrpl/protocol/README.md index f435a4dec3..d679c583d4 100644 --- a/include/xrpl/protocol/README.md +++ b/include/xrpl/protocol/README.md @@ -33,7 +33,7 @@ or may not hold a value. For things not guaranteed to exist, you use `x[~sfFoo]` because you want such a container. It avoids having to look something up twice, once just to see if it exists and a second time to get/set its value. -([Real example](https://github.com/XRPLF/rippled/blob/35f4698aed5dce02f771b34cfbb690495cb5efcc/src/xrpld/app/tx/impl/PayChan.cpp#L229-L236)) +([Real example](https://github.com/XRPLF/rippled/blob/35f4698aed5dce02f771b34cfbb690495cb5efcc/src/ripple/app/tx/impl/PayChan.cpp#L229-L236)) The source of this "type magic" is in [SField.h](./SField.h#L296-L302). diff --git a/include/xrpl/telemetry/SpanNames.h b/include/xrpl/telemetry/SpanNames.h index 895ade77b4..9bcae7bde1 100644 --- a/include/xrpl/telemetry/SpanNames.h +++ b/include/xrpl/telemetry/SpanNames.h @@ -24,8 +24,7 @@ #include #include -namespace xrpl { -namespace telemetry { +namespace xrpl::telemetry { // ===== Compile-time string utility ========================================= @@ -117,5 +116,4 @@ inline constexpr auto error = makeStr("error"); inline constexpr auto followsFrom = makeStr("follows_from"); } // namespace attr_val -} // namespace telemetry -} // namespace xrpl +} // namespace xrpl::telemetry diff --git a/src/tests/libxrpl/telemetry/SpanGuardFactory.cpp b/src/tests/libxrpl/telemetry/SpanGuardFactory.cpp index 373705d2b4..674f0073be 100644 --- a/src/tests/libxrpl/telemetry/SpanGuardFactory.cpp +++ b/src/tests/libxrpl/telemetry/SpanGuardFactory.cpp @@ -2,6 +2,11 @@ #include +#include +#include +#include +#include + using namespace xrpl; using namespace xrpl::telemetry; @@ -52,7 +57,7 @@ TEST(SpanGuardFactory, move_construction_transfers_ownership) { auto span = SpanGuard::span(TraceCategory::Rpc, "rpc", "move"); auto moved = std::move(span); - EXPECT_FALSE(span); + EXPECT_FALSE(span); // NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved) moved.setAttribute("key", "value"); } diff --git a/src/tests/libxrpl/telemetry/TelemetryConfig.cpp b/src/tests/libxrpl/telemetry/TelemetryConfig.cpp index 8c00a2c286..6ee77482f0 100644 --- a/src/tests/libxrpl/telemetry/TelemetryConfig.cpp +++ b/src/tests/libxrpl/telemetry/TelemetryConfig.cpp @@ -1,4 +1,5 @@ #include +#include #include #include @@ -9,7 +10,7 @@ using namespace xrpl; TEST(TelemetryConfig, setup_defaults) { - telemetry::Telemetry::Setup s; + telemetry::Telemetry::Setup const s; EXPECT_FALSE(s.enabled); EXPECT_EQ(s.serviceName, "xrpld"); EXPECT_TRUE(s.serviceVersion.empty()); @@ -32,7 +33,7 @@ TEST(TelemetryConfig, setup_defaults) TEST(TelemetryConfig, parse_empty_section) { - Section section; + Section const section; auto setup = telemetry::setup_Telemetry(section, "nHUtest123", "2.0.0", 0); EXPECT_FALSE(setup.enabled); @@ -92,7 +93,7 @@ TEST(TelemetryConfig, null_telemetry_factory) setup.enabled = false; beast::Journal::Sink& sink = beast::Journal::getNullSink(); - beast::Journal j(sink); + beast::Journal const j(sink); auto tel = telemetry::make_Telemetry(setup, j); EXPECT_TRUE(tel != nullptr); EXPECT_FALSE(tel->isEnabled()); diff --git a/src/xrpld/app/misc/SHAMapStoreImp.h b/src/xrpld/app/misc/SHAMapStoreImp.h index 3c847cf434..08e3dd70eb 100644 --- a/src/xrpld/app/misc/SHAMapStoreImp.h +++ b/src/xrpld/app/misc/SHAMapStoreImp.h @@ -53,7 +53,7 @@ private: // name of state database std::string const dbName_ = "state"; // prefix of on-disk nodestore backend instances - std::string const dbPrefix_ = "xrpldb"; // cspell: disable-line + std::string const dbPrefix_ = "rippledb"; // cspell: disable-line // check health/stop status as records are copied std::uint64_t const checkHealthInterval_ = 1000; // minimum # of ledgers to maintain for health of network diff --git a/src/xrpld/core/detail/Config.cpp b/src/xrpld/core/detail/Config.cpp index 7c55f08c81..b7063287bb 100644 --- a/src/xrpld/core/detail/Config.cpp +++ b/src/xrpld/core/detail/Config.cpp @@ -249,7 +249,7 @@ getSingleSection( //------------------------------------------------------------------------------ char const* const Config::configFileName = "xrpld.cfg"; -char const* const Config::configLegacyName = "xrpld.cfg"; +char const* const Config::configLegacyName = "rippled.cfg"; char const* const Config::databaseDirName = "db"; char const* const Config::validatorsFileName = "validators.txt"; diff --git a/src/xrpld/rpc/detail/PathFindSpanNames.h b/src/xrpld/rpc/detail/PathFindSpanNames.h index 50eaf34e11..40c9509cca 100644 --- a/src/xrpld/rpc/detail/PathFindSpanNames.h +++ b/src/xrpld/rpc/detail/PathFindSpanNames.h @@ -41,9 +41,7 @@ #include -namespace xrpl { -namespace telemetry { -namespace pathfind_span { +namespace xrpl::telemetry::pathfind_span { // ===== Span prefixes ======================================================= @@ -85,6 +83,4 @@ inline constexpr auto numRequests = join(xrplPathfind, makeStr("num_requests")); inline constexpr auto ledgerIndex = join(xrplPathfind, makeStr("ledger_index")); } // namespace attr -} // namespace pathfind_span -} // namespace telemetry -} // namespace xrpl +} // namespace xrpl::telemetry::pathfind_span diff --git a/src/xrpld/rpc/detail/PathRequest.cpp b/src/xrpld/rpc/detail/PathRequest.cpp index 3ee3d08378..8148879362 100644 --- a/src/xrpld/rpc/detail/PathRequest.cpp +++ b/src/xrpld/rpc/detail/PathRequest.cpp @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/src/xrpld/rpc/handlers/orderbook/PathFind.cpp b/src/xrpld/rpc/handlers/orderbook/PathFind.cpp index 607f209d4c..9aa84ac225 100644 --- a/src/xrpld/rpc/handlers/orderbook/PathFind.cpp +++ b/src/xrpld/rpc/handlers/orderbook/PathFind.cpp @@ -18,7 +18,7 @@ Json::Value doPathFind(RPC::JsonContext& context) { using namespace telemetry; - auto span = SpanGuard::span( + [[maybe_unused]] auto span = SpanGuard::span( TraceCategory::Rpc, pathfind_span::prefix::pathfind, pathfind_span::op::request); if (context.app.config().PATH_SEARCH_MAX == 0) return rpcError(rpcNOT_SUPPORTED); diff --git a/src/xrpld/rpc/handlers/orderbook/RipplePathFind.cpp b/src/xrpld/rpc/handlers/orderbook/RipplePathFind.cpp index 5b82f319c3..ff4ed3eb39 100644 --- a/src/xrpld/rpc/handlers/orderbook/RipplePathFind.cpp +++ b/src/xrpld/rpc/handlers/orderbook/RipplePathFind.cpp @@ -26,7 +26,7 @@ Json::Value doRipplePathFind(RPC::JsonContext& context) { using namespace telemetry; - auto span = SpanGuard::span( + [[maybe_unused]] auto span = SpanGuard::span( TraceCategory::Rpc, pathfind_span::prefix::pathfind, pathfind_span::op::request); if (context.app.config().PATH_SEARCH_MAX == 0) return rpcError(rpcNOT_SUPPORTED);