From ad37461ab2e3057d1aa2bd8208027284f176a98b Mon Sep 17 00:00:00 2001 From: sunnyraindy Date: Wed, 19 Nov 2025 09:21:35 +0800 Subject: [PATCH] chore: Fix some typos in comments (#6040) --- external/secp256k1/include/secp256k1.h | 2 +- include/xrpl/basics/SlabAllocator.h | 2 +- include/xrpl/basics/base_uint.h | 2 +- include/xrpl/basics/comparators.h | 2 +- include/xrpl/beast/unit_test/runner.h | 2 +- src/test/app/PermissionedDEX_test.cpp | 4 ++-- src/test/app/ValidatorList_test.cpp | 2 +- src/test/app/tx/apply_test.cpp | 4 ++-- src/test/core/Config_test.cpp | 2 +- src/test/core/SociDB_test.cpp | 2 +- src/test/jtx/amount.h | 2 +- src/test/jtx/envconfig.h | 2 +- src/test/overlay/cluster_test.cpp | 2 +- src/xrpld/peerfinder/detail/SlotImp.h | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/external/secp256k1/include/secp256k1.h b/external/secp256k1/include/secp256k1.h index c6e9417f05..e562cd00e8 100644 --- a/external/secp256k1/include/secp256k1.h +++ b/external/secp256k1/include/secp256k1.h @@ -541,7 +541,7 @@ SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact( /** Verify an ECDSA signature. * * Returns: 1: correct signature - * 0: incorrect or unparseable signature + * 0: incorrect or unparsable signature * Args: ctx: pointer to a context object * In: sig: the signature being verified. * msghash32: the 32-byte message hash being verified. diff --git a/include/xrpl/basics/SlabAllocator.h b/include/xrpl/basics/SlabAllocator.h index b85b2149ca..d27616ecdd 100644 --- a/include/xrpl/basics/SlabAllocator.h +++ b/include/xrpl/basics/SlabAllocator.h @@ -159,7 +159,7 @@ public: @param count the number of items the slab allocator can allocate; note that a count of 0 is valid and means that the allocator is, effectively, disabled. This can be very useful in some - contexts (e.g. when mimimal memory usage is needed) and + contexts (e.g. when minimal memory usage is needed) and allows for graceful failure. */ constexpr explicit SlabAllocator( diff --git a/include/xrpl/basics/base_uint.h b/include/xrpl/basics/base_uint.h index 48c8030f57..4be4b35af3 100644 --- a/include/xrpl/basics/base_uint.h +++ b/include/xrpl/basics/base_uint.h @@ -546,7 +546,7 @@ operator<=>(base_uint const& lhs, base_uint const& rhs) // This comparison might seem wrong on a casual inspection because it // compares data internally stored as std::uint32_t byte-by-byte. But // note that the underlying data is stored in big endian, even if the - // plaform is little endian. This makes the comparison correct. + // platform is little endian. This makes the comparison correct. // // FIXME: use std::lexicographical_compare_three_way once support is // added to MacOS. diff --git a/include/xrpl/basics/comparators.h b/include/xrpl/basics/comparators.h index 6b1d693e65..4858a0ad74 100644 --- a/include/xrpl/basics/comparators.h +++ b/include/xrpl/basics/comparators.h @@ -9,7 +9,7 @@ namespace ripple { /* * MSVC 2019 version 16.9.0 added [[nodiscard]] to the std comparison - * operator() functions. boost::bimap checks that the comparitor is a + * operator() functions. boost::bimap checks that the comparator is a * BinaryFunction, in part by calling the function and ignoring the value. * These two things don't play well together. These wrapper classes simply * strip [[nodiscard]] from operator() for use in boost::bimap. diff --git a/include/xrpl/beast/unit_test/runner.h b/include/xrpl/beast/unit_test/runner.h index f0742c7b01..f91cc92c91 100644 --- a/include/xrpl/beast/unit_test/runner.h +++ b/include/xrpl/beast/unit_test/runner.h @@ -39,7 +39,7 @@ public: The argument string is available to suites and allows for customization of the test. Each suite - defines its own syntax for the argumnet string. + defines its own syntax for the argument string. The same argument is passed to all suites. */ void diff --git a/src/test/app/PermissionedDEX_test.cpp b/src/test/app/PermissionedDEX_test.cpp index d202b39e09..25d94a968b 100644 --- a/src/test/app/PermissionedDEX_test.cpp +++ b/src/test/app/PermissionedDEX_test.cpp @@ -966,8 +966,8 @@ class PermissionedDEX_test : public beast::unit_test::suite { testcase("Remove unfunded offer"); - // checking that an unfunded offer will be implictly removed by a - // successfuly payment tx + // checking that an unfunded offer will be implicitly removed by a + // successful payment tx Env env(*this, features); auto const& [gw, domainOwner, alice, bob, carol, USD, domainID, credType] = PermissionedDEX(env); diff --git a/src/test/app/ValidatorList_test.cpp b/src/test/app/ValidatorList_test.cpp index 370f262075..2f88f0ea1e 100644 --- a/src/test/app/ValidatorList_test.cpp +++ b/src/test/app/ValidatorList_test.cpp @@ -1740,7 +1740,7 @@ private: // locals[0]: from 0 to maxKeys - 4 // locals[1]: from 1 to maxKeys - 2 // locals[2]: from 2 to maxKeys - // interesection of at least 2: same as locals[1] + // intersection of at least 2: same as locals[1] // intersection when 1 is dropped: from 2 to maxKeys - 4 constexpr static int publishers = 3; std::array< diff --git a/src/test/app/tx/apply_test.cpp b/src/test/app/tx/apply_test.cpp index fcfa1a8328..236905cefd 100644 --- a/src/test/app/tx/apply_test.cpp +++ b/src/test/app/tx/apply_test.cpp @@ -49,7 +49,7 @@ public: .first; if (valid != Validity::Valid) - fail("Non-Fully canoncial signature was not permitted"); + fail("Non-Fully canonical signature was not permitted"); } { @@ -63,7 +63,7 @@ public: fully_canonical.app().config()) .first; if (valid == Validity::Valid) - fail("Non-Fully canoncial signature was permitted"); + fail("Non-Fully canonical signature was permitted"); } pass(); diff --git a/src/test/core/Config_test.cpp b/src/test/core/Config_test.cpp index 34c4a553b4..6f11877202 100644 --- a/src/test/core/Config_test.cpp +++ b/src/test/core/Config_test.cpp @@ -1183,7 +1183,7 @@ r.ripple.com:51235 BEAST_EXPECT(cfg.IPS_FIXED[6] == "12.34.12.123 12345"); BEAST_EXPECT(cfg.IPS_FIXED[7] == "12.34.12.123 12345"); - // all ipv6 should be ignored by colon replacer, howsoever formated + // all ipv6 should be ignored by colon replacer, howsoever formatted BEAST_EXPECT(cfg.IPS_FIXED[8] == "::"); BEAST_EXPECT(cfg.IPS_FIXED[9] == "2001:db8::"); BEAST_EXPECT(cfg.IPS_FIXED[10] == "::1"); diff --git a/src/test/core/SociDB_test.cpp b/src/test/core/SociDB_test.cpp index e201f75dba..2d38ac4697 100644 --- a/src/test/core/SociDB_test.cpp +++ b/src/test/core/SociDB_test.cpp @@ -79,7 +79,7 @@ public: void testSQLiteFileNames() { - // confirm that files are given the correct exensions + // confirm that files are given the correct extensions testcase("sqliteFileNames"); BasicConfig c; setupSQLiteConfig(c, getDatabasePath()); diff --git a/src/test/jtx/amount.h b/src/test/jtx/amount.h index 4d32ef2d1a..a5a73c59e8 100644 --- a/src/test/jtx/amount.h +++ b/src/test/jtx/amount.h @@ -243,7 +243,7 @@ struct XRP_t } /** Returns an amount of XRP as PrettyAmount, - which is trivially convertable to STAmount + which is trivially convertible to STAmount @param v The number of XRP (not drops) */ diff --git a/src/test/jtx/envconfig.h b/src/test/jtx/envconfig.h index efc1c50901..4c8476d95f 100644 --- a/src/test/jtx/envconfig.h +++ b/src/test/jtx/envconfig.h @@ -6,7 +6,7 @@ namespace ripple { namespace test { -// frequently used macros defined here for convinience. +// frequently used macros defined here for convenience. #define PORT_WS "port_ws" #define PORT_RPC "port_rpc" #define PORT_PEER "port_peer" diff --git a/src/test/overlay/cluster_test.cpp b/src/test/overlay/cluster_test.cpp index e5fd20bc1b..d29e143cff 100644 --- a/src/test/overlay/cluster_test.cpp +++ b/src/test/overlay/cluster_test.cpp @@ -227,7 +227,7 @@ public: BEAST_EXPECT(!c->load(s4)); // Check if we properly terminate when we encounter - // a malformed or unparseable entry: + // a malformed or unparsable entry: auto const node1 = randomNode(); auto const node2 = randomNode(); diff --git a/src/xrpld/peerfinder/detail/SlotImp.h b/src/xrpld/peerfinder/detail/SlotImp.h index 2badd9a2ef..9898ca490d 100644 --- a/src/xrpld/peerfinder/detail/SlotImp.h +++ b/src/xrpld/peerfinder/detail/SlotImp.h @@ -176,7 +176,7 @@ public: // DEPRECATED public data members // Tells us if we checked the connection. Outbound connections - // are always considered checked since we successfuly connected. + // are always considered checked since we successfully connected. bool checked; // Set to indicate if the connection can receive incoming at the