diff --git a/.config/cspell.config.yaml b/.config/cspell.config.yaml new file mode 100644 index 0000000000..969720a11d --- /dev/null +++ b/.config/cspell.config.yaml @@ -0,0 +1,272 @@ +ignorePaths: + - build/** + - src/libxrpl/crypto + - src/test/** # Will be removed in the future + - CMakeUserPresets.json + - Doxyfile + - docs/**/*.puml + - cmake/** + - LICENSE.md +language: en +allowCompoundWords: true +ignoreRandomStrings: true +minWordLength: 5 +dictionaries: + - cpp + - en_US + - en_GB +ignoreRegExpList: + - /[rs][1-9A-HJ-NP-Za-km-z]{25,34}/g # addresses and seeds + - /(XRPL|BEAST)_[A-Z_0-9]+_H_INCLUDED+/g # include guards + - /(XRPL|BEAST)_[A-Z_0-9]+_H+/g # include guards + - /::[a-z:_]+/g # things from other namespaces + - /lib[a-z]+/g # libraries + - /[0-9]{4}-[0-9]{2}-[0-9]{2}[,:][A-Za-zÀ-ÖØ-öø-ÿ.\s]+/g # copyright dates + - /[0-9]{4}[,:]?\s*[A-Za-zÀ-ÖØ-öø-ÿ.\s]+/g # copyright years + - /\[[A-Za-z0-9-]+\]\(https:\/\/github.com\/[A-Za-z0-9-]+\)/g # Github usernames + - /-[DWw][a-zA-Z0-9_-]+=/g # compile flags + - /[\['"`]-[DWw][a-zA-Z0-9_-]+['"`\]]/g # compile flags +suggestWords: + - xprl->xrpl + - unsynched->unsynced + - synched->synced + - synch->sync +words: + - abempty + - AMMID + - amt + - amts + - asnode + - asynchrony + - attestation + - authorises + - autobridge + - autobridged + - autobridging + - bimap + - bindir + - bookdir + - Bougalis + - Britto + - Btrfs + - canonicality + - checkme + - chrono + - citardauq + - clawback + - clawbacks + - coeffs + - coldwallet + - compr + - conanfile + - conanrun + - connectability + - coro + - coros + - cowid + - cryptocondition + - cryptoconditional + - cryptoconditions + - csprng + - ctid + - currenttxhash + - daria + - dcmake + - dearmor + - deleteme + - demultiplexer + - deserializaton + - desync + - desynced + - determ + - distro + - doxyfile + - dxrpl + - endmacro + - endpointv + - exceptioned + - Falco + - finalizers + - firewalled + - fmtdur + - funclets + - gcov + - gcovr + - Gnutella + - gpgcheck + - gpgkey + - hotwallet + - ifndef + - inequation + - insuf + - insuff + - iou + - ious + - isrdc + - jemalloc + - jlog + - keylet + - keylets + - keyvadb + - ledgerentry + - ledgerhash + - ledgerindex + - leftw + - legleux + - levelization + - levelized + - libpb + - libxrpl + - llection + - LOCALGOOD + - logwstream + - lseq + - lsmf + - ltype + - MEMORYSTATUSEX + - Merkle + - Metafuncton + - misprediction + - mptbalance + - mptflags + - mptid + - mptissuance + - mptissuanceid + - mptoken + - mptokenid + - mptokenissuance + - mptokens + - mpts + - multisig + - multisign + - multisigned + - Nakamoto + - nftid + - nftoffer + - nftoken + - nftokenid + - nftokenpages + - nftokens + - nftpage + - nikb + - nonxrp + - noripple + - nudb + - nullptr + - nunl + - Nyffenegger + - ostr + - partitioner + - paychan + - paychans + - permdex + - perminute + - permissioned + - pointee + - preauth + - preauthorization + - preauthorize + - preauthorizes + - preclaim + - protobuf + - protos + - ptrs + - pyenv + - qalloc + - queuable + - Raphson + - replayer + - rerere + - retriable + - RIPD + - ripdtop + - rippleci + - rippled + - ripplerpc + - rippletest + - RLUSD + - rngfill + - rocksdb + - Rohrs + - roundings + - sahyadri + - Satoshi + - secp + - sendq + - seqit + - sf + - shamap + - shamapitem + - sidechain + - SIGGOOD + - sle + - sles + - soci + - socidb + - sslws + - statsd + - STATSDCOLLECTOR + - stissue + - stnum + - stobj + - stobject + - stpath + - stpathset + - sttx + - stvar + - stvector + - stxchainattestations + - superpeer + - superpeers + - takergets + - takerpays + - ters + - tx + - txid + - txids + - txjson + - txn + - txns + - txs + - umant + - unacquired + - unambiguity + - unauthorizes + - unauthorizing + - unergonomic + - unfetched + - unflatten + - unfund + - unimpair + - unroutable + - unscalable + - unserviced + - unshareable + - unshares + - unsquelch + - unsquelched + - unsquelching + - unvalidated + - unveto + - unvetoed + - upvotes + - USDB + - variadics + - venv + - vfalco + - vinnie + - wextra + - wptr + - writeme + - wsrch + - wthread + - xbridge + - xchain + - ximinez + - XMACRO + - xrpkuwait + - xrpl + - xrpld + - xrplf + - xxhash + - xxhasher diff --git a/.github/scripts/levelization/README.md b/.github/scripts/levelization/README.md index 3b77a192b9..c8954b900e 100644 --- a/.github/scripts/levelization/README.md +++ b/.github/scripts/levelization/README.md @@ -81,7 +81,7 @@ It generates many files of [results](results): - `rawincludes.txt`: The raw dump of the `#includes` - `paths.txt`: A second dump grouping the source module - to the destination module, deduped, and with frequency counts. + to the destination module, de-duped, and with frequency counts. - `includes/`: A directory where each file represents a module and contains a list of modules and counts that the module _includes_. - `includedby/`: Similar to `includes/`, but the other way around. Each diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c85e0798f7..4a1dc159dc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,6 +36,21 @@ repos: hooks: - id: black + # - repo: https://github.com/streetsidesoftware/cspell-cli + # rev: v9.2.0 + # hooks: + # - id: cspell # Spell check changed files + # - id: cspell # Spell check the commit message + # name: check commit message spelling + # args: + # - --no-must-find-files + # - --no-progress + # - --no-summary + # - --files + # - .git/COMMIT_EDITMSG + # stages: [commit-msg] + # always_run: true # This might not be necessary. + exclude: | (?x)^( external/.*| diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5b578b7f13..4f99972713 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -555,16 +555,16 @@ Rippled uses a linear workflow model that can be summarized as: git fetch --multiple upstreams user1 user2 user3 [...] git checkout -B release-next --no-track upstream/develop -# Only do an ff-only merge if prbranch1 is either already +# Only do an ff-only merge if pr-branch1 is either already # squashed, or needs to be merged with separate commits, # and has no merge commits. -# Use -S on the ff-only merge if prbranch1 isn't signed. -git merge [-S] --ff-only user1/prbranch1 +# Use -S on the ff-only merge if pr-branch1 isn't signed. +git merge [-S] --ff-only user1/pr-branch1 -git merge --squash user2/prbranch2 +git merge --squash user2/pr-branch2 git commit -S # Use the commit message provided on the PR -git merge --squash user3/prbranch3 +git merge --squash user3/pr-branch3 git commit -S # Use the commit message provided on the PR [...] @@ -876,7 +876,7 @@ git push --delete upstream-push master-next #### Special cases: point releases, hotfixes, etc. -On occassion, a bug or issue is discovered in a version that already +On occasion, a bug or issue is discovered in a version that already had a final release. Most of the time, development will have started on the next version, and will usually have changes in `develop` and often in `release`. diff --git a/SECURITY.md b/SECURITY.md index 3fd85bad0a..18eec312ed 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -42,7 +42,7 @@ For more information on responsible disclosure, please read this [Wikipedia arti ## Report Handling Process -Please report the bug directly to us and limit further disclosure. If you want to prove that you knew the bug as of a given time, consider using a cryptographic precommitment: hash the content of your report and publish the hash on a medium of your choice (e.g. on Twitter or as a memo in a transaction) as "proof" that you had written the text at a given point in time. +Please report the bug directly to us and limit further disclosure. If you want to prove that you knew the bug as of a given time, consider using a cryptographic pre-commitment: hash the content of your report and publish the hash on a medium of your choice (e.g. on Twitter or as a memo in a transaction) as "proof" that you had written the text at a given point in time. Once we receive a report, we: diff --git a/cfg/xrpld-example.cfg b/cfg/xrpld-example.cfg index b5180dce52..93fab4a9ba 100644 --- a/cfg/xrpld-example.cfg +++ b/cfg/xrpld-example.cfg @@ -218,7 +218,7 @@ # administrative commands. # # NOTE A common configuration value for the admin field is "localhost". -# If you are listening on all IPv4/IPv6 addresses by specifing +# If you are listening on all IPv4/IPv6 addresses by specifying # ip = :: then you can use admin = ::ffff:127.0.0.1,::1 to allow # administrative access from both IPv4 and IPv6 localhost # connections. diff --git a/cmake/XrplCore.cmake b/cmake/XrplCore.cmake index 12ba58d499..0689fbe7b6 100644 --- a/cmake/XrplCore.cmake +++ b/cmake/XrplCore.cmake @@ -206,7 +206,7 @@ if(xrpld) ) exclude_if_included(xrpld) # define a macro for tests that might need to - # be exluded or run differently in CI environment + # be excluded or run differently in CI environment if(is_ci) target_compile_definitions(xrpld PRIVATE XRPL_RUNNING_IN_CI) endif () diff --git a/docs/0001-negative-unl/README.md b/docs/0001-negative-unl/README.md index f28ff63c6f..c863cab9da 100644 --- a/docs/0001-negative-unl/README.md +++ b/docs/0001-negative-unl/README.md @@ -134,7 +134,7 @@ validation messages (_PAV_) received from each validator on the node's UNL. Note that the node will only count the validation messages that agree with its own validations. -We define the **PAV** as the **P**ercentage of **A**greed **V**alidation +We define the **PAV** as the Percentage of Agreed Validation messages received for the last N ledgers, where N = 256 by default. When the PAV drops below the **_low-water mark_**, the validator is considered diff --git a/docs/0001-negative-unl/negativeUNLSqDiagram.puml b/docs/0001-negative-unl/negativeUNLSqDiagram.puml index 9f37d43903..d86b98c01f 100644 --- a/docs/0001-negative-unl/negativeUNLSqDiagram.puml +++ b/docs/0001-negative-unl/negativeUNLSqDiagram.puml @@ -43,14 +43,14 @@ alt phase == OPEN alt sqn%256==0 CA -[#green]> RM: getValidations CA -[#green]> CA: create UNLModify Tx - hnote over CA#lightgreen: use validatations of the last 256 ledgers\nto figure out UNLModify Tx candidates.\nIf any, create UNLModify Tx, and add to TxSet. + hnote over CA#lightgreen: use validations of the last 256 ledgers\nto figure out UNLModify Tx candidates.\nIf any, create UNLModify Tx, and add to TxSet. end CA -> GC GC -> CA: propose deactivate CA end else phase == ESTABLISH - hnote over GC: receive peer postions + hnote over GC: receive peer positions GC -> GC : update our position GC -> CA : propose \n(if position changed) GC -> GC : check if have consensus diff --git a/docs/consensus.md b/docs/consensus.md index 067e15d0c8..23e5e7d5be 100644 --- a/docs/consensus.md +++ b/docs/consensus.md @@ -189,7 +189,7 @@ validations. It checks this on every call to `timerEntry`. - _Wrong Ledger_ indicates the node is not working on the correct prior ledger and does not have it available. It requests that ledger from the network, but continues to work towards consensus this round while waiting. If it had been - _proposing_, it will send a special "bowout" proposal to its peers to indicate + _proposing_, it will send a special "bow-out" proposal to its peers to indicate its change in mode for the rest of this round. For the duration of the round, it defers to peer positions for determining the consensus outcome as if it were just _observing_. @@ -515,7 +515,7 @@ are excerpts of the generic consensus implementation and of helper types that wi interact with the concrete implementing class. ```{.cpp} -// Represents a transction under dispute this round +// Represents a transaction under dispute this round template class DisputedTx; // Represents how the node participates in Consensus this round diff --git a/include/xrpl/basics/IntrusiveRefCounts.h b/include/xrpl/basics/IntrusiveRefCounts.h index 630c08395d..440ecdd19c 100644 --- a/include/xrpl/basics/IntrusiveRefCounts.h +++ b/include/xrpl/basics/IntrusiveRefCounts.h @@ -301,7 +301,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const // change the counts and flags (the count could be atomically changed, but // the flags depend on the current value of the counts). // - // Note: If this becomes a perf bottleneck, the `partialDestoryStartedMask` + // Note: If this becomes a perf bottleneck, the `partialDestroyStartedMask` // may be able to be set non-atomically. But it is easier to reason about // the code if the flag is set atomically. while (1) diff --git a/include/xrpl/basics/Log.h b/include/xrpl/basics/Log.h index 9443e8afdf..f10f1ff64c 100644 --- a/include/xrpl/basics/Log.h +++ b/include/xrpl/basics/Log.h @@ -221,7 +221,8 @@ public: private: enum { // Maximum line length for log messages. - // If the message exceeds this length it will be truncated with elipses. + // If the message exceeds this length it will be truncated with + // ellipses. maximumMessageCharacters = 12 * 1024 }; diff --git a/include/xrpl/beast/core/LexicalCast.h b/include/xrpl/beast/core/LexicalCast.h index fea1c35f55..c5b7f5540a 100644 --- a/include/xrpl/beast/core/LexicalCast.h +++ b/include/xrpl/beast/core/LexicalCast.h @@ -18,7 +18,7 @@ namespace beast { namespace detail { -// These specializatons get called by the non-member functions to do the work +// These specializations get called by the non-member functions to do the work template struct LexicalCast; diff --git a/include/xrpl/json/json_reader.h b/include/xrpl/json/json_reader.h index a660d82e2a..963dc0f26e 100644 --- a/include/xrpl/json/json_reader.h +++ b/include/xrpl/json/json_reader.h @@ -1,8 +1,6 @@ #ifndef XRPL_JSON_JSON_READER_H_INCLUDED #define XRPL_JSON_JSON_READER_H_INCLUDED -#define CPPTL_JSON_READER_H_INCLUDED - #include #include @@ -231,4 +229,4 @@ operator>>(std::istream&, Value&); } // namespace Json -#endif // CPPTL_JSON_READER_H_INCLUDED +#endif // XRPL_JSON_JSON_READER_H_INCLUDED diff --git a/include/xrpl/json/json_value.h b/include/xrpl/json/json_value.h index 2e38f2e75e..3daf441592 100644 --- a/include/xrpl/json/json_value.h +++ b/include/xrpl/json/json_value.h @@ -682,4 +682,4 @@ public: } // namespace Json -#endif // CPPTL_JSON_H_INCLUDED +#endif // XRPL_JSON_JSON_VALUE_H_INCLUDED diff --git a/include/xrpl/ledger/CredentialHelpers.h b/include/xrpl/ledger/CredentialHelpers.h index 52ddfe33aa..b90aa44c0d 100644 --- a/include/xrpl/ledger/CredentialHelpers.h +++ b/include/xrpl/ledger/CredentialHelpers.h @@ -15,7 +15,7 @@ namespace xrpl { namespace credentials { // These function will be used by the code that use DepositPreauth / Credentials -// (and any future preauthorization modes) as part of authorization (all the +// (and any future pre-authorization modes) as part of authorization (all the // transfer funds transactions) // Check if credential sfExpiration field has passed ledger's parentCloseTime @@ -41,7 +41,8 @@ checkFields(STTx const& tx, beast::Journal j); // Accessing the ledger to check if provided credentials are valid. Do not use // in doApply (only in preclaim) since it does not remove expired credentials. -// If you call it in prelaim, you also must call verifyDepositPreauth in doApply +// If you call it in preclaim, you also must call verifyDepositPreauth in +// doApply TER valid( STTx const& tx, diff --git a/include/xrpl/nodestore/DummyScheduler.h b/include/xrpl/nodestore/DummyScheduler.h index 9ffe5ad80d..b31613480f 100644 --- a/include/xrpl/nodestore/DummyScheduler.h +++ b/include/xrpl/nodestore/DummyScheduler.h @@ -6,7 +6,7 @@ namespace xrpl { namespace NodeStore { -/** Simple NodeStore Scheduler that just peforms the tasks synchronously. */ +/** Simple NodeStore Scheduler that just performs the tasks synchronously. */ class DummyScheduler : public Scheduler { public: diff --git a/include/xrpl/nodestore/README.md b/include/xrpl/nodestore/README.md index 83da29d9ce..4b228bfc9a 100644 --- a/include/xrpl/nodestore/README.md +++ b/include/xrpl/nodestore/README.md @@ -96,7 +96,7 @@ Facebook's RocksDB database, builds on LevelDB. Use SQLite. -'path' speficies where the backend will store its data files. +'path' specifies where the backend will store its data files. Choices for 'compression' @@ -161,7 +161,7 @@ Through various executions and profiling some conclusions are presented below. - Multiple runs of the benchmarks can yield surprisingly different results. This can perhaps be attributed to the asynchronous nature of rocksdb's compaction - process. The benchmarks are artifical and create highly unlikely write load to + process. The benchmarks are artificial and create highly unlikely write load to create the dataset to measure different read access patterns. Therefore multiple runs of the benchmarks are required to get a feel for the effectiveness of the changes. This contrasts sharply with the keyvadb benchmarking were highly diff --git a/include/xrpl/proto/org/xrpl/rpc/v1/xrp_ledger.proto b/include/xrpl/proto/org/xrpl/rpc/v1/xrp_ledger.proto index 2b8dc471ce..942a4a2135 100644 --- a/include/xrpl/proto/org/xrpl/rpc/v1/xrp_ledger.proto +++ b/include/xrpl/proto/org/xrpl/rpc/v1/xrp_ledger.proto @@ -9,7 +9,7 @@ import "org/xrpl/rpc/v1/get_ledger_entry.proto"; import "org/xrpl/rpc/v1/get_ledger_data.proto"; import "org/xrpl/rpc/v1/get_ledger_diff.proto"; -// These methods are binary only methods for retrieiving arbitrary ledger state +// These methods are binary only methods for retrieving arbitrary ledger state // via gRPC. These methods are used by clio, but can also be // used by any client that wants to extract ledger state in an efficient manner. // They do not directly mimic the JSON equivalent methods. diff --git a/include/xrpl/protocol/Indexes.h b/include/xrpl/protocol/Indexes.h index 1cb22b4d6c..777c3b8aa9 100644 --- a/include/xrpl/protocol/Indexes.h +++ b/include/xrpl/protocol/Indexes.h @@ -18,7 +18,7 @@ namespace xrpl { class SeqProxy; -/** Keylet computation funclets. +/** Keylet computation functions. Entries in the ledger are located using 256-bit locators. The locators are calculated using a wide range of parameters specific to the entry whose diff --git a/include/xrpl/protocol/Protocol.h b/include/xrpl/protocol/Protocol.h index fb315eace4..0c72b80de4 100644 --- a/include/xrpl/protocol/Protocol.h +++ b/include/xrpl/protocol/Protocol.h @@ -179,7 +179,7 @@ static constexpr int loanPaymentsPerFeeIncrement = 5; * * This limit is enforced during the loan payment process, and thus is not * estimated. If the limit is hit, no further payments or overpayments will be - * processed, no matter how much of the transation Amount is left, but the + * processed, no matter how much of the transaction Amount is left, but the * transaction will succeed with the payments that have been processed up to * that point. * diff --git a/include/xrpl/protocol/Quality.h b/include/xrpl/protocol/Quality.h index 1fafa5e321..83a038490a 100644 --- a/include/xrpl/protocol/Quality.h +++ b/include/xrpl/protocol/Quality.h @@ -210,7 +210,7 @@ public: private: // The ceil_in and ceil_out methods that deal in TAmount all convert - // their arguments to STAoumout and convert the result back to TAmount. + // their arguments to STAmount and convert the result back to TAmount. // This helper function takes care of all the conversion operations. template < class In, diff --git a/include/xrpl/protocol/TxFlags.h b/include/xrpl/protocol/TxFlags.h index 194c4c6af1..5527a264e4 100644 --- a/include/xrpl/protocol/TxFlags.h +++ b/include/xrpl/protocol/TxFlags.h @@ -277,7 +277,7 @@ constexpr std::uint32_t const tfLoanOverpayment = 0x00010000; // interest and fees, or it will fail. False: Not a full payment. constexpr std::uint32_t const tfLoanFullPayment = 0x00020000; // tfLoanLatePayment: True, indicates that the payment is late, -// and includes late iterest and fees. If the loan is not late, +// and includes late interest and fees. If the loan is not late, // it will fail. False: not a late payment. If the current payment // is overdue, the transaction will fail. constexpr std::uint32_t const tfLoanLatePayment = 0x00040000; diff --git a/include/xrpl/protocol/XChainAttestations.h b/include/xrpl/protocol/XChainAttestations.h index 4dc9cfcf6a..bd76936b49 100644 --- a/include/xrpl/protocol/XChainAttestations.h +++ b/include/xrpl/protocol/XChainAttestations.h @@ -33,12 +33,12 @@ struct AttestationBase // Account on the sending chain that triggered the event (sent the // transaction) AccountID sendingAccount; - // Amount transfered on the sending chain + // Amount transferred on the sending chain STAmount sendingAmount; // Account on the destination chain that collects a share of the attestation // reward AccountID rewardAccount; - // Amount was transfered on the locking chain + // Amount was transferred on the locking chain bool wasLockingChainSend; explicit AttestationBase( @@ -354,7 +354,7 @@ struct XChainCreateAccountAttestation XChainCreateAccountAttestation const& rhs); }; -// Attestations from witness servers for a particular claimid and bridge. +// Attestations from witness servers for a particular claim ID and bridge. // Only one attestation per signature is allowed. template class XChainAttestationsBase diff --git a/include/xrpl/protocol/detail/STVar.h b/include/xrpl/protocol/detail/STVar.h index 540ba2bf77..219d1ed738 100644 --- a/include/xrpl/protocol/detail/STVar.h +++ b/include/xrpl/protocol/detail/STVar.h @@ -42,7 +42,7 @@ concept ValidConstructSTArgs = class STVar { private: - // The largest "small object" we can accomodate + // The largest "small object" we can accommodate static std::size_t constexpr max_size = 72; std::aligned_storage::type d_; diff --git a/include/xrpl/protocol/detail/ledger_entries.macro b/include/xrpl/protocol/detail/ledger_entries.macro index 1034c35895..de9c41bf52 100644 --- a/include/xrpl/protocol/detail/ledger_entries.macro +++ b/include/xrpl/protocol/detail/ledger_entries.macro @@ -237,7 +237,7 @@ LEDGER_ENTRY(ltOFFER, 0x006f, Offer, offer, ({ {sfAdditionalBooks, soeOPTIONAL}, })) -/** A ledger object which describes a deposit preauthorization. +/** A ledger object which describes a deposit pre-authorization. \sa keylet::depositPreauth */ @@ -577,7 +577,7 @@ LEDGER_ENTRY(ltLOAN, 0x0089, Loan, loan, ({ // - TrueTotalLoanValue = PaymentRemaining * PeriodicPayment // The unrounded true total value of the loan. // - // - TrueTotalPrincialOutstanding can be computed using the algorithm + // - TrueTotalPrincipalOutstanding can be computed using the algorithm // in the ripple::detail::loanPrincipalFromPeriodicPayment function. // // - TrueTotalInterestOutstanding = TrueTotalLoanValue - diff --git a/include/xrpl/resource/README.md b/include/xrpl/resource/README.md index 253e3c7625..e525ce83e3 100644 --- a/include/xrpl/resource/README.md +++ b/include/xrpl/resource/README.md @@ -66,7 +66,7 @@ values over time: this is implemented by the DecayingSample class. Each server in a cluster creates a list of IP addresses of end points that are imposing a significant load. This list is called Gossip, which is passed to other nodes in that cluster. Gossip helps individual -servers in the cluster identify IP addreses that might be unduly loading +servers in the cluster identify IP addresses that might be unduly loading the entire cluster. Again the recourse of the individual servers is to drop connections to those IP addresses that occur commonly in the gossip. diff --git a/include/xrpl/resource/detail/Logic.h b/include/xrpl/resource/detail/Logic.h index b1f90e0282..5bcfa42f31 100644 --- a/include/xrpl/resource/detail/Logic.h +++ b/include/xrpl/resource/detail/Logic.h @@ -61,7 +61,7 @@ private: // List of all active admin entries EntryIntrusiveList admin_; - // List of all inactve entries + // List of all inactive entries EntryIntrusiveList inactive_; // All imported gossip data diff --git a/include/xrpl/server/detail/LowestLayer.h b/include/xrpl/server/detail/LowestLayer.h index 57647867e3..c45d948241 100644 --- a/include/xrpl/server/detail/LowestLayer.h +++ b/include/xrpl/server/detail/LowestLayer.h @@ -9,7 +9,7 @@ namespace xrpl { -// Before boost 1.70, get_lowest_layer required an explicit templat parameter +// Before boost 1.70, get_lowest_layer required an explicit template parameter template decltype(auto) get_lowest_layer(T& t) noexcept diff --git a/include/xrpl/shamap/README.md b/include/xrpl/shamap/README.md index 3bff74e67b..419918c0cb 100644 --- a/include/xrpl/shamap/README.md +++ b/include/xrpl/shamap/README.md @@ -226,7 +226,7 @@ The `fetchNodeNT()` method goes through three phases: Any SHAMapLeafNode that is immutable has a sequence number of zero (sharable). When a mutable `SHAMap` is created then its SHAMapTreeNodes are - given non-zero sequence numbers (unsharable). But all nodes in the + given non-zero sequence numbers (unshareable). But all nodes in the TreeNodeCache are immutable, so if one is found here, its sequence number will be 0. diff --git a/include/xrpl/shamap/SHAMapItem.h b/include/xrpl/shamap/SHAMapItem.h index a69f40113d..e8d95b0684 100644 --- a/include/xrpl/shamap/SHAMapItem.h +++ b/include/xrpl/shamap/SHAMapItem.h @@ -125,13 +125,13 @@ intrusive_ptr_release(SHAMapItem const* x) { auto p = reinterpret_cast(x); - // The SHAMapItem constuctor isn't trivial (because the destructor + // The SHAMapItem constructor isn't trivial (because the destructor // for CountedObject isn't) so we can't avoid calling it here, but // plan for a future where we might not need to. if constexpr (!std::is_trivially_destructible_v) std::destroy_at(x); - // If the slabber doens't claim this pointer, it was allocated + // If the slabber doesn't claim this pointer, it was allocated // manually, so we free it manually. if (!detail::slabber.deallocate(const_cast(p))) delete[] p; diff --git a/src/libxrpl/basics/Number.cpp b/src/libxrpl/basics/Number.cpp index 96c13c9db8..9984b26ffe 100644 --- a/src/libxrpl/basics/Number.cpp +++ b/src/libxrpl/basics/Number.cpp @@ -38,8 +38,8 @@ Number::setround(rounding_mode mode) // Guard -// The Guard class is used to tempoarily add extra digits of -// preicision to an operation. This enables the final result +// The Guard class is used to temporarily add extra digits of +// precision to an operation. This enables the final result // to be correctly rounded to the internal precision of Number. class Number::Guard diff --git a/src/libxrpl/basics/make_SSLContext.cpp b/src/libxrpl/basics/make_SSLContext.cpp index 579edb0f71..ef5996e051 100644 --- a/src/libxrpl/basics/make_SSLContext.cpp +++ b/src/libxrpl/basics/make_SSLContext.cpp @@ -28,7 +28,7 @@ namespace xrpl { namespace openssl { namespace detail { -/** The default strength of self-signed RSA certifices. +/** The default strength of self-signed RSA certificates. Per NIST Special Publication 800-57 Part 3, 2048-bit RSA is still considered acceptably secure. Generally, we would want to go above @@ -131,7 +131,7 @@ initAnonymous(boost::asio::ssl::context& context) LogicError("X509_new failed"); // According to the standards (X.509 et al), the value should be one - // less than the actualy certificate version we want. Since we want + // less than the actually certificate version we want. Since we want // version 3, we must use a 2. X509_set_version(x509, 2); diff --git a/src/libxrpl/json/Writer.cpp b/src/libxrpl/json/Writer.cpp index fcdceb7253..6da29211ca 100644 --- a/src/libxrpl/json/Writer.cpp +++ b/src/libxrpl/json/Writer.cpp @@ -193,7 +193,7 @@ public: } private: - // JSON collections are either arrrays, or objects. + // JSON collections are either arrays, or objects. struct Collection { explicit Collection() = default; diff --git a/src/libxrpl/ledger/View.cpp b/src/libxrpl/ledger/View.cpp index c817a85b65..329d3cfcae 100644 --- a/src/libxrpl/ledger/View.cpp +++ b/src/libxrpl/ledger/View.cpp @@ -3244,7 +3244,7 @@ enforceMPTokenAuthorization( auto const maybeDomainID = sleIssuance->at(~sfDomainID); bool expired = false; bool const authorizedByDomain = [&]() -> bool { - // NOTE: defensive here, shuld be checked in preclaim + // NOTE: defensive here, should be checked in preclaim if (!maybeDomainID.has_value()) return false; // LCOV_EXCL_LINE diff --git a/src/libxrpl/protocol/IOUAmount.cpp b/src/libxrpl/protocol/IOUAmount.cpp index 01283886e1..5c9ab1febc 100644 --- a/src/libxrpl/protocol/IOUAmount.cpp +++ b/src/libxrpl/protocol/IOUAmount.cpp @@ -18,7 +18,7 @@ namespace xrpl { namespace { -// Use a static inside a function to help prevent order-of-initialzation issues +// Use a static inside a function to help prevent order-of-initialization issues LocalValue& getStaticSTNumberSwitchover() { diff --git a/src/libxrpl/protocol/STAmount.cpp b/src/libxrpl/protocol/STAmount.cpp index 824453a4d3..ebccfb3e64 100644 --- a/src/libxrpl/protocol/STAmount.cpp +++ b/src/libxrpl/protocol/STAmount.cpp @@ -662,7 +662,7 @@ STAmount::getFullText() const std::string STAmount::getText() const { - // keep full internal accuracy, but make more human friendly if posible + // keep full internal accuracy, but make more human friendly if possible if (*this == beast::zero) return "0"; diff --git a/src/libxrpl/protocol/tokens.cpp b/src/libxrpl/protocol/tokens.cpp index d4253a2df1..420eb56df0 100644 --- a/src/libxrpl/protocol/tokens.cpp +++ b/src/libxrpl/protocol/tokens.cpp @@ -649,7 +649,7 @@ encodeBase58Token( return detail::b256_to_b58_be(b58Span, out); } // Convert from base 58 to base 256, largest coefficients first -// The input is encoded in XPRL format, with the token in the first +// The input is encoded in XRPL format, with the token in the first // byte and the checksum in the last four bytes. // The decoded base 256 value does not include the token type or checksum. // It is an error if the token type or checksum does not match. diff --git a/src/test/app/AccountDelete_test.cpp b/src/test/app/AccountDelete_test.cpp index 749ed33e28..44d484ac7a 100644 --- a/src/test/app/AccountDelete_test.cpp +++ b/src/test/app/AccountDelete_test.cpp @@ -103,7 +103,7 @@ public: env(trust(becky, gw["USD"](1000))); env.close(); - // Give carol a deposit preauthorization, an offer, a ticket, + // Give carol a deposit pre-authorization, an offer, a ticket, // a signer list, and a DID. Even with all that she's still deletable. env(deposit::auth(carol, becky)); std::uint32_t const carolOfferSeq{env.seq(carol)}; @@ -176,7 +176,7 @@ public: auto const carolOldBalance{env.balance(carol)}; // Verify that Carol's account, directory, deposit - // preauthorization, offer, ticket, and signer list exist. + // pre-authorization, offer, ticket, and signer list exist. BEAST_EXPECT(env.closed()->exists(keylet::account(carol.id()))); BEAST_EXPECT(env.closed()->exists(keylet::ownerDir(carol.id()))); BEAST_EXPECT(env.closed()->exists( @@ -886,7 +886,7 @@ public: env, eaton, carol, credType)[jss::result][jss::index] .asString(); - // fred make preauthorization through authorized account + // fred make pre-authorization through authorized account env(fset(fred, asfDepositAuth)); env.close(); env(deposit::auth(fred, eaton)); diff --git a/src/test/app/AmendmentTable_test.cpp b/src/test/app/AmendmentTable_test.cpp index 9add892073..a320bccfe8 100644 --- a/src/test/app/AmendmentTable_test.cpp +++ b/src/test/app/AmendmentTable_test.cpp @@ -506,7 +506,7 @@ public: // Parameters: // table: Our table of known and vetoed amendments - // validators: The addreses of validators we trust + // validators: The addresses of validators we trust // votes: Amendments and the number of validators who vote for them // ourVotes: The amendments we vote for in our validation // enabled: In/out enabled amendments diff --git a/src/test/app/DepositAuth_test.cpp b/src/test/app/DepositAuth_test.cpp index 4235c8c9ca..775d7b1e81 100644 --- a/src/test/app/DepositAuth_test.cpp +++ b/src/test/app/DepositAuth_test.cpp @@ -15,7 +15,7 @@ reserve(jtx::Env& env, std::uint32_t count) return env.current()->fees().accountReserve(count); } -// Helper function that returns true if acct has the lsfDepostAuth flag set. +// Helper function that returns true if acct has the lsfDepositAuth flag set. static bool hasDepositAuth(jtx::Env const& env, jtx::Account const& acct) { @@ -512,7 +512,7 @@ struct DepositPreauth_test : public beast::unit_test::suite env.require(owners(carol, 1)); env.require(owners(becky, 0)); - // But carol can't meet the reserve for another preauthorization. + // But carol can't meet the reserve for another pre-authorization. env(deposit::auth(carol, alice), ter(tecINSUFFICIENT_RESERVE)); env.close(); env.require(owners(carol, 1)); @@ -724,7 +724,7 @@ struct DepositPreauth_test : public beast::unit_test::suite env.fund(XRP(5000), issuer, bob, alice); env.close(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -737,7 +737,7 @@ struct DepositPreauth_test : public beast::unit_test::suite env(deposit::auth(bob, alice)); env.close(); - // And alice can't pay with any credentials, amendement is not + // And alice can't pay with any credentials, amendment is not // enabled std::string const invalidIdx = "0E0B04ED60588A758B67E21FBBE95AC5A63598BA951761DC0EC9C08D7E" @@ -765,11 +765,11 @@ struct DepositPreauth_test : public beast::unit_test::suite credentials::ledgerEntry(env, alice, issuer, credType); std::string const credIdx = jv[jss::result][jss::index].asString(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); - // Bob will accept payements from accounts with credentials signed + // Bob will accept payments from accounts with credentials signed // by 'issuer' env(deposit::authCredentials(bob, {{issuer, credType}})); env.close(); @@ -838,12 +838,12 @@ struct DepositPreauth_test : public beast::unit_test::suite std::string const credIdx = jv[jss::result][jss::index].asString(); { - // Success as destination didn't enable preauthorization so + // Success as destination didn't enable pre-authorization so // valid credentials will not fail env(pay(alice, bob, XRP(100)), credentials::ids({credIdx})); } - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -1141,7 +1141,7 @@ struct DepositPreauth_test : public beast::unit_test::suite jv = credentials::ledgerEntry(env, alice, issuer, credType2); std::string const credIdx2 = jv[jss::result][jss::index].asString(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); // Bob setup DepositPreauth object @@ -1268,7 +1268,7 @@ struct DepositPreauth_test : public beast::unit_test::suite jv = credentials::ledgerEntry(env, zelda, issuer, credType); std::string const credIdx = jv[jss::result][jss::index].asString(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); // Bob setup DepositPreauth object diff --git a/src/test/app/Escrow_test.cpp b/src/test/app/Escrow_test.cpp index d4a9fc5b9d..25bb03858e 100644 --- a/src/test/app/Escrow_test.cpp +++ b/src/test/app/Escrow_test.cpp @@ -1553,7 +1553,7 @@ struct Escrow_test : public beast::unit_test::suite escrow::finish_time(env.now() + 50s)); env.close(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -1635,7 +1635,7 @@ struct Escrow_test : public beast::unit_test::suite escrow::finish_time(env.now() + 1s)); env.close(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); env(deposit::authCredentials(bob, {{zelda, credType}})); diff --git a/src/test/app/FixNFTokenPageLinks_test.cpp b/src/test/app/FixNFTokenPageLinks_test.cpp index baa33b2dc5..ad457cc58b 100644 --- a/src/test/app/FixNFTokenPageLinks_test.cpp +++ b/src/test/app/FixNFTokenPageLinks_test.cpp @@ -135,7 +135,7 @@ class FixNFTokenPageLinks_test : public beast::unit_test::suite // Preflight { - // Fail preflight1. Can't combine AcccountTxnID and ticket. + // Fail preflight1. Can't combine AccountTxnID and ticket. Json::Value tx = ledgerStateFix::nftPageLinks(alice, alice); tx[sfAccountTxnID.jsonName] = "00000000000000000000000000000000" diff --git a/src/test/app/Invariants_test.cpp b/src/test/app/Invariants_test.cpp index 8eb3047dc8..61b4e7ba76 100644 --- a/src/test/app/Invariants_test.cpp +++ b/src/test/app/Invariants_test.cpp @@ -888,7 +888,7 @@ class Invariants_test : public beast::unit_test::suite doInvariantCheck( {{"escrow specifies invalid amount"}}, [](Account const& A1, Account const&, ApplyContext& ac) { - // mpissuance outstanding is negative + // mptissuance outstanding is negative auto const sle = ac.view().peek(keylet::account(A1.id())); if (!sle) return false; @@ -906,7 +906,7 @@ class Invariants_test : public beast::unit_test::suite doInvariantCheck( {{"escrow specifies invalid amount"}}, [](Account const& A1, Account const&, ApplyContext& ac) { - // mpissuance locked is less than locked + // mptissuance locked is less than locked auto const sle = ac.view().peek(keylet::account(A1.id())); if (!sle) return false; @@ -924,7 +924,7 @@ class Invariants_test : public beast::unit_test::suite doInvariantCheck( {{"escrow specifies invalid amount"}}, [](Account const& A1, Account const&, ApplyContext& ac) { - // mpissuance outstanding is less than locked + // mptissuance outstanding is less than locked auto const sle = ac.view().peek(keylet::account(A1.id())); if (!sle) return false; @@ -3179,7 +3179,7 @@ class Invariants_test : public beast::unit_test::suite sleShares->at(sfSequence) = sequence; // sleVault->at(sfAccount) = pseudoId; - // Setting wrong pseudo acocunt ID + // Setting wrong pseudo account ID sleVault->at(sfAccount) = A2.id(); sleVault->at(sfFlags) = 0; sleVault->at(sfSequence) = sequence; @@ -3222,7 +3222,7 @@ class Invariants_test : public beast::unit_test::suite sleShares->setFieldU64(sfOwnerNode, *sharesPage); sleShares->at(sfFlags) = 0; - // Setting wrong pseudo acocunt ID + // Setting wrong pseudo account ID sleShares->at(sfIssuer) = AccountID(uint160(42)); sleShares->at(sfOutstandingAmount) = 0; sleShares->at(sfSequence) = sequence; diff --git a/src/test/app/LoanBroker_test.cpp b/src/test/app/LoanBroker_test.cpp index 72a732d043..5915ebae91 100644 --- a/src/test/app/LoanBroker_test.cpp +++ b/src/test/app/LoanBroker_test.cpp @@ -974,7 +974,7 @@ class LoanBroker_test : public beast::unit_test::suite return coverWithdraw(alice, brokerKeylet.key, asset(10)); }); - // preclaim: tecWRONG_ASSSET + // preclaim: tecWRONG_ASSET env(coverWithdraw(alice, brokerKeylet.key, issuer["BAD"](10)), ter(tecWRONG_ASSET), THISLINE); diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index 1de142c2ab..62531f2b8f 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -115,7 +115,7 @@ class MPToken_test : public beast::unit_test::suite .metadata = "", .err = temMALFORMED}); - // MaximumAmout of 0 returns error + // MaximumAmount of 0 returns error mptAlice.create( {.maxAmt = 0, .assetScale = 1, @@ -400,7 +400,7 @@ class MPToken_test : public beast::unit_test::suite // a mptoken yet mptAlice.authorize({.holder = bob, .err = tecOBJECT_NOT_FOUND}); - // alice specifys a holder acct that doesn't exist + // alice specifies a holder acct that doesn't exist mptAlice.authorize({.holder = cindy, .err = tecNO_DST}); // bob now holds a mptoken object @@ -1805,7 +1805,7 @@ class MPToken_test : public beast::unit_test::suite // alice authorizes bob to hold funds mptAlice.authorize({.account = alice, .holder = bob}); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); @@ -1884,7 +1884,7 @@ class MPToken_test : public beast::unit_test::suite // alice authorizes bob to hold funds mptAlice.authorize({.account = alice, .holder = bob}); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); diff --git a/src/test/app/NFTokenBurn_test.cpp b/src/test/app/NFTokenBurn_test.cpp index 828539f4b1..a1c6ffb6de 100644 --- a/src/test/app/NFTokenBurn_test.cpp +++ b/src/test/app/NFTokenBurn_test.cpp @@ -165,7 +165,7 @@ class NFTokenBurn_test : public beast::unit_test::suite // prevent alice's and minter's NFTs from clustering together // in becky's directory. // - // Use a default initialized mercenne_twister because we want the + // Use a default initialized mersenne_twister because we want the // effect of random numbers, but we want the test to run the same // way each time. std::mt19937 engine; diff --git a/src/test/app/NFToken_test.cpp b/src/test/app/NFToken_test.cpp index 75bf59e70d..59995a4078 100644 --- a/src/test/app/NFToken_test.cpp +++ b/src/test/app/NFToken_test.cpp @@ -429,7 +429,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite if (replacement->getFieldU32(sfMintedNFTokens) != 1) return false; // Unexpected test conditions. - // Wequence number is generated by sfFirstNFTokenSequence + + // Sequence number is generated by sfFirstNFTokenSequence + // sfMintedNFTokens. We can replace the two fields with any // numbers as long as they add up to the largest valid number. // In our case, sfFirstNFTokenSequence is set to the largest @@ -1423,7 +1423,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite env.close(); // minter1 is no longer alice's minter, so no longer has - // permisson to burn alice's nfts. + // permission to burn alice's nfts. env(token::burn(minter1, burnableID), token::owner(buyer), ter(tecNO_PERMISSION)); @@ -2003,7 +2003,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite BEAST_EXPECT(ownerCount(env, becky) == 1); BEAST_EXPECT(ownerCount(env, minter) == 0); - // Just for tidyness, becky burns the token before shutting + // Just for tidiness, becky burns the token before shutting // things down. env(token::burn(becky, nftAliceID)); env.close(); @@ -5853,7 +5853,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite // alice tries to delete her account, but is unsuccessful. // Due to authorized minting, alice's account sequence does not // advance while minter mints NFTokens for her. - // The new account deletion retriction enabled by this amendment will enforce // alice to wait for more ledgers to close before she can // delete her account, to prevent duplicate NFTokenIDs @@ -5955,7 +5955,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite // alice tries to delete her account, but is unsuccessful. // Due to authorized minting, alice's account sequence does not // advance while minter mints NFTokens for her using tickets. - // The new account deletion retriction enabled by this amendment will enforce // alice to wait for more ledgers to close before she can // delete her account, to prevent duplicate NFTokenIDs @@ -6061,7 +6061,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite // alice tries to delete her account, but is unsuccessful. // Due to authorized minting, alice's account sequence does not // advance while minter mints NFTokens for her using tickets. - // The new account deletion retriction enabled by this amendment will enforce // alice to wait for more ledgers to close before she can delete her // account, to prevent duplicate NFTokenIDs @@ -6388,7 +6388,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite // // The values of these fields are dependent on the NFTokenID/OfferID // changed in its corresponding transaction. We want to validate each - // transaction to make sure the synethic fields hold the right values. + // transaction to make sure the synthetic fields hold the right values. testcase("Test synthetic fields from JSON response"); diff --git a/src/test/app/PayChan_test.cpp b/src/test/app/PayChan_test.cpp index 20a433b5dd..ed8c3c507e 100644 --- a/src/test/app/PayChan_test.cpp +++ b/src/test/app/PayChan_test.cpp @@ -763,7 +763,7 @@ struct PayChan_test : public beast::unit_test::suite BEAST_EXPECT(env.balance(bob) == preBob + delta - baseFee); } { - // Explore the limits of deposit preauthorization. + // Explore the limits of deposit pre-authorization. auto const delta = XRP(600).value(); auto const sig = signClaimAuth(pk, alice.sk(), chan, delta); @@ -799,7 +799,7 @@ struct PayChan_test : public beast::unit_test::suite env.balance(bob) == preBob + delta - (3 * baseFee)); } { - // bob removes preauthorization of alice. Once again she + // bob removes pre-authorization of alice. Once again she // cannot submit a claim. auto const delta = XRP(800).value(); @@ -874,7 +874,7 @@ struct PayChan_test : public beast::unit_test::suite credentials::ledgerEntry(env, alice, carol, credType); std::string const credIdx = jv[jss::result][jss::index].asString(); - // Bob require preauthorization + // Bob require pre-authorization env(fset(bob, asfDepositAuth)); env.close(); diff --git a/src/test/app/PermissionedDEX_test.cpp b/src/test/app/PermissionedDEX_test.cpp index b5db131db6..c29b5344e2 100644 --- a/src/test/app/PermissionedDEX_test.cpp +++ b/src/test/app/PermissionedDEX_test.cpp @@ -1534,7 +1534,7 @@ public: { FeatureBitset const all{jtx::testable_amendments()}; - // Test domain offer (w/o hyrbid) + // Test domain offer (w/o hybrid) testOfferCreate(all); testPayment(all); testBookStep(all); diff --git a/src/test/app/ValidatorSite_test.cpp b/src/test/app/ValidatorSite_test.cpp index 71a5b7fa73..1118818d7a 100644 --- a/src/test/app/ValidatorSite_test.cpp +++ b/src/test/app/ValidatorSite_test.cpp @@ -422,7 +422,7 @@ public: 1, detail::default_expires, std::chrono::seconds{-90}}}); - // fetch single site with undending redirect (fails to load) + // fetch single site with unending redirect (fails to load) testFetchList( good, {{"/redirect_forever/301", @@ -443,7 +443,7 @@ public: ssl, true, true}}); - // one undending redirect, one not + // one unending redirect, one not testFetchList( good, {{"/validators", "", ssl}, @@ -452,7 +452,7 @@ public: ssl, true, true}}); - // one undending redirect, one not + // one unending redirect, one not testFetchList( good, {{"/validators2", "", ssl}, diff --git a/src/test/basics/IntrusiveShared_test.cpp b/src/test/basics/IntrusiveShared_test.cpp index d5d5d75048..b77325efa9 100644 --- a/src/test/basics/IntrusiveShared_test.cpp +++ b/src/test/basics/IntrusiveShared_test.cpp @@ -394,7 +394,7 @@ public: { // strong goes out of scope while weak is still in scope // This checks that partialDelete has run to completion - // before the desturctor is called. A sleep is inserted + // before the destructor is called. A sleep is inserted // inside the partial delete to make sure the destructor is // given an opportunity to run durring partial delete. BEAST_EXPECT(cur == partiallyDeleted); diff --git a/src/test/basics/XRPAmount_test.cpp b/src/test/basics/XRPAmount_test.cpp index da03a3533f..3f4e68de6e 100644 --- a/src/test/basics/XRPAmount_test.cpp +++ b/src/test/basics/XRPAmount_test.cpp @@ -218,7 +218,7 @@ public: // multiply and divide by values that would overflow if done // naively, and check that it gives the correct answer - big -= 0xf; // Subtract a little so it's divisable by 4 + big -= 0xf; // Subtract a little so it's divisible by 4 BEAST_EXPECT( mulRatio(big, 3, 4, false).value() == (big.value() / 4) * 3); BEAST_EXPECT( diff --git a/src/test/consensus/ByzantineFailureSim_test.cpp b/src/test/consensus/ByzantineFailureSim_test.cpp index 0a988f0473..210333e303 100644 --- a/src/test/consensus/ByzantineFailureSim_test.cpp +++ b/src/test/consensus/ByzantineFailureSim_test.cpp @@ -63,7 +63,7 @@ class ByzantineFailureSim_test : public beast::unit_test::suite { peer->submit(Tx{0}); // Peers 0,1,2,6 will close the next ledger differently by injecting - // a non-consensus approved transaciton + // a non-consensus approved transaction if (byzantineNodes.contains(peer)) { peer->txInjections.emplace( diff --git a/src/test/consensus/Consensus_test.cpp b/src/test/consensus/Consensus_test.cpp index 85dd5e3957..b7bfb302bc 100644 --- a/src/test/consensus/Consensus_test.cpp +++ b/src/test/consensus/Consensus_test.cpp @@ -63,7 +63,7 @@ public: using namespace std::chrono_literals; testcase("check consensus"); - // Use default parameterss + // Use default parameters ConsensusParms const p{}; /////////////// @@ -74,7 +74,7 @@ public: ConsensusState::No == checkConsensus(10, 2, 2, 0, 3s, 2s, false, p, true, journal_)); - // If not enough peers have propsed, ensure + // If not enough peers have proposed, ensure // more time for proposals BEAST_EXPECT( ConsensusState::No == @@ -119,7 +119,7 @@ public: ConsensusState::No == checkConsensus(10, 2, 2, 0, 3s, 2s, true, p, true, journal_)); - // If not enough peers have propsed, ensure + // If not enough peers have proposed, ensure // more time for proposals BEAST_EXPECT( ConsensusState::No == @@ -661,7 +661,7 @@ public: // Run to the ledger *prior* to decreasing the resolution sim.run(increaseLedgerTimeResolutionEvery - 2); - // In order to create the discrepency, we want a case where if + // In order to create the discrepancy, we want a case where if // X = effCloseTime(closeTime, resolution, parentCloseTime) // X != effCloseTime(X, resolution, parentCloseTime) // @@ -906,7 +906,7 @@ public: // for B. // - The network reconnects and the validations for generation 3 ledgers // are observed (D and the 8 C's) - // - In the old approach, 2 votes for D outweights 1 vote for each C' + // - In the old approach, 2 votes for D outweighs 1 vote for each C' // so the network would avalanche towards D and fully validate it // EVEN though C was fully validated by one node // - In the new approach, 2 votes for D are not enough to outweight the @@ -1029,7 +1029,7 @@ public: // The "ahead" validators run normal speed and run ahead validating the // upper chain of ledgers. // - // Due to the uncommited support definition of the preferred branch + // Due to the uncommitted support definition of the preferred branch // protocol, even if the "behind" validators are a majority, the "ahead" // validators cannot jump to the proper branch until the "behind" // validators catch up to the same sequence number. For this test to diff --git a/src/test/consensus/DistributedValidatorsSim_test.cpp b/src/test/consensus/DistributedValidatorsSim_test.cpp index 006c1aab4e..1a088576ce 100644 --- a/src/test/consensus/DistributedValidatorsSim_test.cpp +++ b/src/test/consensus/DistributedValidatorsSim_test.cpp @@ -59,7 +59,7 @@ class DistributedValidators_test : public beast::unit_test::suite // Initial round to set prior state sim.run(1); - // Run for 10 minues, submitting 100 tx/second + // Run for 10 minutes, submitting 100 tx/second std::chrono::nanoseconds const simDuration = 10min; std::chrono::nanoseconds const quiet = 10s; Rate const rate{100, 1000ms}; @@ -163,7 +163,7 @@ class DistributedValidators_test : public beast::unit_test::suite // Initial round to set prior state sim.run(1); - // Run for 10 minues, submitting 100 tx/second + // Run for 10 minutes, submitting 100 tx/second std::chrono::nanoseconds simDuration = 10min; std::chrono::nanoseconds quiet = 10s; Rate rate{100, 1000ms}; diff --git a/src/test/consensus/ScaleFreeSim_test.cpp b/src/test/consensus/ScaleFreeSim_test.cpp index 53c5030f29..dee4c77268 100644 --- a/src/test/consensus/ScaleFreeSim_test.cpp +++ b/src/test/consensus/ScaleFreeSim_test.cpp @@ -56,7 +56,7 @@ class ScaleFreeSim_test : public beast::unit_test::suite // Initialize timers HeartbeatTimer heart(sim.scheduler, seconds(10s)); - // Run for 10 minues, submitting 100 tx/second + // Run for 10 minutes, submitting 100 tx/second std::chrono::nanoseconds const simDuration = 10min; std::chrono::nanoseconds const quiet = 10s; Rate const rate{100, 1000ms}; diff --git a/src/test/csf/CollectorRef.h b/src/test/csf/CollectorRef.h index 3aa2c6495f..022db01008 100644 --- a/src/test/csf/CollectorRef.h +++ b/src/test/csf/CollectorRef.h @@ -8,7 +8,7 @@ namespace xrpl { namespace test { namespace csf { -/** Holds a type-erased reference to an arbitray collector. +/** Holds a type-erased reference to an arbitrary collector. A collector is any class that implements diff --git a/src/test/csf/Histogram.h b/src/test/csf/Histogram.h index e32fded2f2..61ec680939 100644 --- a/src/test/csf/Histogram.h +++ b/src/test/csf/Histogram.h @@ -26,7 +26,7 @@ template > class Histogram { // TODO: Consider logarithmic bins around expected median if this becomes - // unscaleable + // unscalable std::map counts_; std::size_t samples = 0; diff --git a/src/test/jtx/TestHelpers.h b/src/test/jtx/TestHelpers.h index f00b929967..3096a902b1 100644 --- a/src/test/jtx/TestHelpers.h +++ b/src/test/jtx/TestHelpers.h @@ -29,7 +29,7 @@ namespace xrpl { namespace test { namespace jtx { -/** Generic helper class for helper clases that set a field on a JTx. +/** Generic helper class for helper classes that set a field on a JTx. Not every helper will be able to use this because of conversions and other issues, but for classes where it's straightforward, this can simplify things. diff --git a/src/test/jtx/deposit.h b/src/test/jtx/deposit.h index 5ea1e5bf06..e378366563 100644 --- a/src/test/jtx/deposit.h +++ b/src/test/jtx/deposit.h @@ -15,7 +15,7 @@ namespace deposit { Json::Value auth(Account const& account, Account const& auth); -/** Remove preauthorization for deposit. Invoke as deposit::unauth. */ +/** Remove pre-authorization for deposit. Invoke as deposit::unauth. */ Json::Value unauth(Account const& account, Account const& unauth); diff --git a/src/test/jtx/rpc.h b/src/test/jtx/rpc.h index 5a7c205aac..ba3c71074d 100644 --- a/src/test/jtx/rpc.h +++ b/src/test/jtx/rpc.h @@ -49,7 +49,7 @@ public: // always obtained from the lookup into the ErrorInfo lookup table. // // Take advantage of that fact to populate jt.rpcException. The - // check will be aware of whether the rpcExcpetion can be safely + // check will be aware of whether the rpcException can be safely // ignored. jt.rpcCode = { *code_, diff --git a/src/test/protocol/Seed_test.cpp b/src/test/protocol/Seed_test.cpp index 65428295f8..d33f397921 100644 --- a/src/test/protocol/Seed_test.cpp +++ b/src/test/protocol/Seed_test.cpp @@ -292,7 +292,7 @@ public: testcase("Parsing"); // account IDs and node and account public and private - // keys should not be parseable as seeds. + // keys should not be parsable as seeds. auto const node1 = randomKeyPair(KeyType::secp256k1); diff --git a/src/test/rpc/AccountObjects_test.cpp b/src/test/rpc/AccountObjects_test.cpp index e438d50633..4f3e1817e1 100644 --- a/src/test/rpc/AccountObjects_test.cpp +++ b/src/test/rpc/AccountObjects_test.cpp @@ -667,7 +667,7 @@ public: env(deposit::auth(gw, alice)); env.close(); { - // Find the preauthorization. + // Find the pre-authorization. Json::Value const resp = acctObjs(gw, jss::deposit_preauth); BEAST_EXPECT(acctObjsIsSize(resp, 1)); diff --git a/src/test/rpc/ManifestRPC_test.cpp b/src/test/rpc/ManifestRPC_test.cpp index 5d4f4900eb..96326e010f 100644 --- a/src/test/rpc/ManifestRPC_test.cpp +++ b/src/test/rpc/ManifestRPC_test.cpp @@ -30,7 +30,7 @@ public: "Missing field 'public_key'."); } { - // manifest with manlformed public key + // manifest with malformed public key auto const info = env.rpc( "json", "manifest", diff --git a/src/test/rpc/Subscribe_test.cpp b/src/test/rpc/Subscribe_test.cpp index 1637554f5c..5a58c27ea8 100644 --- a/src/test/rpc/Subscribe_test.cpp +++ b/src/test/rpc/Subscribe_test.cpp @@ -1362,7 +1362,7 @@ public: // // The values of these fields are dependent on the NFTokenID/OfferID // changed in its corresponding transaction. We want to validate each - // response to make sure the synethic fields hold the right values. + // response to make sure the synthetic fields hold the right values. testcase("Test synthetic fields from Subscribe response"); diff --git a/src/tests/libxrpl/basics/base64.cpp b/src/tests/libxrpl/basics/base64.cpp index e4581126b4..f6544105d8 100644 --- a/src/tests/libxrpl/basics/base64.cpp +++ b/src/tests/libxrpl/basics/base64.cpp @@ -16,6 +16,7 @@ check(std::string const& in, std::string const& out) TEST_CASE("base64") { + // cspell: disable check("", ""); check("f", "Zg=="); check("fo", "Zm8="); @@ -23,6 +24,7 @@ TEST_CASE("base64") check("foob", "Zm9vYg=="); check("fooba", "Zm9vYmE="); check("foobar", "Zm9vYmFy"); + // cspell: enable check( "Man is distinguished, not only by his reason, but by this " diff --git a/src/xrpld/app/consensus/RCLConsensus.h b/src/xrpld/app/consensus/RCLConsensus.h index e26cde9801..2e33bbae14 100644 --- a/src/xrpld/app/consensus/RCLConsensus.h +++ b/src/xrpld/app/consensus/RCLConsensus.h @@ -59,7 +59,7 @@ class RCLConsensus // The timestamp of the last validation we used NetClock::time_point lastValidationTime_; - // These members are queried via public accesors and are atomic for + // These members are queried via public accessors and are atomic for // thread safety. std::atomic validating_{false}; std::atomic prevProposers_{0}; diff --git a/src/xrpld/app/ledger/AbstractFetchPackContainer.h b/src/xrpld/app/ledger/AbstractFetchPackContainer.h index 85efe09e29..d2cdd1e920 100644 --- a/src/xrpld/app/ledger/AbstractFetchPackContainer.h +++ b/src/xrpld/app/ledger/AbstractFetchPackContainer.h @@ -16,7 +16,7 @@ class AbstractFetchPackContainer public: virtual ~AbstractFetchPackContainer() = default; - /** Retrieves partial ledger data of the coresponding hash from peers.` + /** Retrieves partial ledger data of the corresponding hash from peers.` @param nodeHash The 256-bit hash of the data to fetch. @return `std::nullopt` if the hash isn't cached, diff --git a/src/xrpld/app/ledger/BookListeners.cpp b/src/xrpld/app/ledger/BookListeners.cpp index 69d03058a9..ebd59c3fcc 100644 --- a/src/xrpld/app/ledger/BookListeners.cpp +++ b/src/xrpld/app/ledger/BookListeners.cpp @@ -30,7 +30,7 @@ BookListeners::publish( if (p) { - // Only publish jvObj if this is the first occurence + // Only publish jvObj if this is the first occurrence if (havePublished.emplace(p->getSeq()).second) { jvObj.visit( diff --git a/src/xrpld/app/ledger/README.md b/src/xrpld/app/ledger/README.md index d2afe01e71..cb935897b8 100644 --- a/src/xrpld/app/ledger/README.md +++ b/src/xrpld/app/ledger/README.md @@ -450,7 +450,7 @@ back as the database goes. If requested, it can additionally repair the SQLite entries for transactions in each checked ledger. This was primarily intended to repair incorrect -entries created by a bug (since fixed) that could cause transasctions from a +entries created by a bug (since fixed) that could cause transactions from a ledger other than the fully-validated ledger to appear in the SQLite databases in addition to the transactions from the correct ledger. diff --git a/src/xrpld/app/main/GRPCServer.cpp b/src/xrpld/app/main/GRPCServer.cpp index e415ee14cf..6ed902ec1e 100644 --- a/src/xrpld/app/main/GRPCServer.cpp +++ b/src/xrpld/app/main/GRPCServer.cpp @@ -413,7 +413,7 @@ GRPCServerImpl::handleRpcs() // tells us whether there is any kind of event or cq_ is shutting down. // When cq_.Next(...) returns false, all work has been completed and the // loop can exit. When the server is shutdown, each CallData object that is - // listening for a request is forceably cancelled, and is returned by + // listening for a request is forcibly cancelled, and is returned by // cq_->Next() with ok set to false. Then, each CallData object processing // a request must complete (by sending data to the client), each of which // will be returned from cq_->Next() with ok set to true. After all diff --git a/src/xrpld/app/main/GRPCServer.h b/src/xrpld/app/main/GRPCServer.h index dab71303c4..c2697e26c6 100644 --- a/src/xrpld/app/main/GRPCServer.h +++ b/src/xrpld/app/main/GRPCServer.h @@ -126,7 +126,7 @@ public: getEndpoint() const; private: - // Class encompasing the state and logic needed to serve a request. + // Class encompassing the state and logic needed to serve a request. template class CallData : public Processor, diff --git a/src/xrpld/app/misc/FeeEscalation.md b/src/xrpld/app/misc/FeeEscalation.md index 468ab2b528..7843620320 100644 --- a/src/xrpld/app/misc/FeeEscalation.md +++ b/src/xrpld/app/misc/FeeEscalation.md @@ -237,7 +237,7 @@ often coincides with new ledgers with zero transactions. recover if the problem is temporary. These exact values were chosen experimentally, and can easily change in the future. - _Minimum `lastLedgerMedianFeeLevel`_. The value of 500 was chosen to - ensure that the first escalated fee was more significant and noticable + ensure that the first escalated fee was more significant and noticeable than what the default would allow. This exact value was chosen experimentally, and can easily change in the future. - _Transaction queue size limit_. The limit is computed based on the @@ -291,7 +291,7 @@ single-singed reference transaction. It is up to the user to compute the necessary fees for other types of transactions. (E.g. multiply all drop values by 5 for a multi-signed transaction with 4 signatures.) -The `fee` result is always instantanteous, and relates to the open +The `fee` result is always instantaneous, and relates to the open ledger. It includes the sequence number of the current open ledger, but may not make sense if rippled is not synced to the network. diff --git a/src/xrpld/app/misc/HashRouter.cpp b/src/xrpld/app/misc/HashRouter.cpp index 0cad01c27e..a2ba41b361 100644 --- a/src/xrpld/app/misc/HashRouter.cpp +++ b/src/xrpld/app/misc/HashRouter.cpp @@ -14,7 +14,7 @@ HashRouter::emplace(uint256 const& key) -> std::pair return std::make_pair(std::ref(iter->second), false); } - // See if any supressions need to be expired + // See if any suppressions need to be expired expire(suppressionMap_, setup_.holdTime); return std::make_pair( diff --git a/src/xrpld/app/misc/HashRouter.h b/src/xrpld/app/misc/HashRouter.h index 1b59797b28..449097a387 100644 --- a/src/xrpld/app/misc/HashRouter.h +++ b/src/xrpld/app/misc/HashRouter.h @@ -193,7 +193,7 @@ public: virtual ~HashRouter() = default; - // VFALCO TODO Replace "Supression" terminology with something more + // VFALCO TODO Replace "Suppression" terminology with something more // semantically meaningful. void addSuppression(uint256 const& key); diff --git a/src/xrpld/app/misc/Manifest.h b/src/xrpld/app/misc/Manifest.h index 24e4f5f71f..c1a77be63b 100644 --- a/src/xrpld/app/misc/Manifest.h +++ b/src/xrpld/app/misc/Manifest.h @@ -303,7 +303,7 @@ public: std::optional getDomain(PublicKey const& pk) const; - /** Returns mainfest corresponding to a given public key + /** Returns manifest corresponding to a given public key @return manifest corresponding to Master public key if present, otherwise std::nullopt diff --git a/src/xrpld/app/misc/NetworkOPs.cpp b/src/xrpld/app/misc/NetworkOPs.cpp index 084a584377..d0f93577da 100644 --- a/src/xrpld/app/misc/NetworkOPs.cpp +++ b/src/xrpld/app/misc/NetworkOPs.cpp @@ -290,7 +290,7 @@ public: * transactions and wait for this transaction to complete. * * @param transaction Transaction object. - * @param bUnliimited Whether a privileged client connection submitted it. + * @param bUnlimited Whether a privileged client connection submitted it. * @param failType fail_hard setting from transaction submission. */ void @@ -1260,7 +1260,7 @@ NetworkOPsImp::preProcessTransaction(std::shared_ptr& transaction) return false; } - // NOTE eahennis - I think this check is redundant, + // NOTE ximinez - I think this check is redundant, // but I'm not 100% sure yet. // If so, only cost is looking up HashRouter flags. auto const [validity, reason] = @@ -2194,7 +2194,7 @@ NetworkOPsImp::endConsensus(std::unique_ptr const& clog) { // check if the ledger is good enough to go to FULL // Note: Do not go to FULL if we don't have the previous ledger - // check if the ledger is bad enough to go to CONNECTE D -- TODO + // check if the ledger is bad enough to go to CONNECTED -- TODO auto current = m_ledgerMaster.getCurrentLedger(); if (app_.timeKeeper().now() < (current->header().parentCloseTime + @@ -3638,7 +3638,7 @@ NetworkOPsImp::subAccount( auto simIterator = subMap.find(naAccountID); if (simIterator == subMap.end()) { - // Not found, note that account has a new single listner. + // Not found, note that account has a new single listener. SubMapType usisElement; usisElement[isrListener->getSeq()] = isrListener; // VFALCO NOTE This is making a needless copy of naAccountID @@ -4578,7 +4578,7 @@ NetworkOPsImp::getBookPage( Rate offerRate = parityRate; if (rate != parityRate - // Have a tranfer fee. + // Have a transfer fee. && uTakerID != book.out.account // Not taking offers of own IOUs. && book.out.account != uOfferOwnerID) @@ -4728,7 +4728,7 @@ NetworkOPsImp::getBookPage( Rate offerRate = parityRate; if (rate != parityRate - // Have a tranfer fee. + // Have a transfer fee. && uTakerID != book.out.account // Not taking offers of own IOUs. && book.out.account != uOfferOwnerID) @@ -4751,7 +4751,7 @@ NetworkOPsImp::getBookPage( saTakerGetsFunded.setJson(jvOffer[jss::taker_gets_funded]); - // TOOD(tom): The result of this expression is not used - what's + // TODO(tom): The result of this expression is not used - what's // going on here? std::min( saTakerPays, diff --git a/src/xrpld/app/misc/NetworkOPs.h b/src/xrpld/app/misc/NetworkOPs.h index 800f473959..5b92e4574b 100644 --- a/src/xrpld/app/misc/NetworkOPs.h +++ b/src/xrpld/app/misc/NetworkOPs.h @@ -31,9 +31,9 @@ class CanonicalTXSet; // should use this interface. The RPC code will primarily be a light wrapper // over this code. // -// Eventually, it will check the node's operating mode (synched, unsynched, -// etectera) and defer to the correct means of processing. The current -// code assumes this node is synched (and will continue to do so until +// Eventually, it will check the node's operating mode (synced, unsynced, +// etcetera) and defer to the correct means of processing. The current +// code assumes this node is synced (and will continue to do so until // there's a functional network. // diff --git a/src/xrpld/app/misc/SHAMapStoreImp.cpp b/src/xrpld/app/misc/SHAMapStoreImp.cpp index 0e33a0bc10..98be038554 100644 --- a/src/xrpld/app/misc/SHAMapStoreImp.cpp +++ b/src/xrpld/app/misc/SHAMapStoreImp.cpp @@ -104,7 +104,7 @@ SHAMapStoreImp::SHAMapStoreImp( get_if_exists(section, "delete_batch", deleteBatch_); std::uint32_t temp; if (get_if_exists(section, "back_off_milliseconds", temp) || - // Included for backward compaibility with an undocumented setting + // Included for backward compatibility with an undocumented setting get_if_exists(section, "backOff", temp)) { backOff_ = std::chrono::milliseconds{temp}; diff --git a/src/xrpld/app/misc/Transaction.h b/src/xrpld/app/misc/Transaction.h index ac801a2cd0..9f75387744 100644 --- a/src/xrpld/app/misc/Transaction.h +++ b/src/xrpld/app/misc/Transaction.h @@ -221,7 +221,7 @@ public: } /** - * @brief setQueued Set this flag once was put into heldtxns queue + * @brief setQueued Set this flag once was put into held-txns queue */ void setQueued() diff --git a/src/xrpld/app/misc/TxQ.h b/src/xrpld/app/misc/TxQ.h index aff7fc89db..fb1b10e886 100644 --- a/src/xrpld/app/misc/TxQ.h +++ b/src/xrpld/app/misc/TxQ.h @@ -95,7 +95,7 @@ public: allowing more than `maximumTxnInLedger` "cheap" transactions into the open ledger. - @todo eahennis. This setting seems to go against our goals and + @todo ximinez. This setting seems to go against our goals and values. Can it be removed? */ std::optional maximumTxnInLedger; diff --git a/src/xrpld/app/misc/detail/LendingHelpers.cpp b/src/xrpld/app/misc/detail/LendingHelpers.cpp index 51e0988bc4..37385583e7 100644 --- a/src/xrpld/app/misc/detail/LendingHelpers.cpp +++ b/src/xrpld/app/misc/detail/LendingHelpers.cpp @@ -1652,7 +1652,7 @@ computeLoanProperties( principalOutstanding = roundToAsset( asset, principalOutstanding, loanScale, Number::to_nearest); - // E diff --git a/src/xrpld/app/tx/detail/CreateOffer.cpp b/src/xrpld/app/tx/detail/CreateOffer.cpp index f81afecd55..848599943a 100644 --- a/src/xrpld/app/tx/detail/CreateOffer.cpp +++ b/src/xrpld/app/tx/detail/CreateOffer.cpp @@ -814,11 +814,11 @@ CreateOffer::applyGuts(Sandbox& sb, Sandbox& sbCancel) Book const book{saTakerPays.issue(), saTakerGets.issue(), domainID}; // Add offer to order book, using the original rate - // before any crossing occured. + // before any crossing occurred. // // Regular offer - BookDirectory points to open directory // - // Domain offer (w/o hyrbid) - BookDirectory points to domain + // Domain offer (w/o hybrid) - BookDirectory points to domain // directory // // Hybrid domain offer - BookDirectory points to domain directory, diff --git a/src/xrpld/app/tx/detail/InvariantCheck.h b/src/xrpld/app/tx/detail/InvariantCheck.h index b7f91a1c46..ef9db373f5 100644 --- a/src/xrpld/app/tx/detail/InvariantCheck.h +++ b/src/xrpld/app/tx/detail/InvariantCheck.h @@ -613,7 +613,7 @@ public: }; /** - * @brief Invariants: Pseudo-accounts have valid and consisent properties + * @brief Invariants: Pseudo-accounts have valid and consistent properties * * Pseudo-accounts have certain properties, and some of those properties are * unique to pseudo-accounts. Check that all pseudo-accounts are following the diff --git a/src/xrpld/app/tx/detail/NFTokenUtils.cpp b/src/xrpld/app/tx/detail/NFTokenUtils.cpp index c737855840..3a43cda6f0 100644 --- a/src/xrpld/app/tx/detail/NFTokenUtils.cpp +++ b/src/xrpld/app/tx/detail/NFTokenUtils.cpp @@ -940,7 +940,7 @@ tokenOfferCreatePreclaim( { // If this is a sell offer, check that the account is allowed to // receive IOUs. If this is a buy offer, we have to check that trustline - // is authorized, even though we previosly checked it's balance via + // is authorized, even though we previously checked it's balance via // accountHolds. This is due to a possibility of existence of // unauthorized trustlines with balance auto const res = nft::checkTrustlineAuthorized( diff --git a/src/xrpld/app/tx/detail/Payment.cpp b/src/xrpld/app/tx/detail/Payment.cpp index 7a14cecc2d..59c7431f4c 100644 --- a/src/xrpld/app/tx/detail/Payment.cpp +++ b/src/xrpld/app/tx/detail/Payment.cpp @@ -316,7 +316,7 @@ Payment::preclaim(PreclaimContext const& ctx) << "Delay transaction: Destination account does not exist. " << "Insufficent payment to create account."; - // TODO: dedupe + // TODO: de-dupe // Another transaction could create the account and then this // transaction would succeed. return tecNO_DST_INSUF_XRP; @@ -558,7 +558,7 @@ Payment::doApply() // If the actual amount delivered is different from the original // amount due to partial payment or transfer fee, we need to update - // DelieveredAmount using the actual delivered amount + // DeliveredAmount using the actual delivered amount if (view().rules().enabled(fixMPTDeliveredAmount) && amountDeliver != dstAmount) ctx_.deliver(amountDeliver); diff --git a/src/xrpld/conditions/detail/PreimageSha256.h b/src/xrpld/conditions/detail/PreimageSha256.h index 642a7afdc0..f495885794 100644 --- a/src/xrpld/conditions/detail/PreimageSha256.h +++ b/src/xrpld/conditions/detail/PreimageSha256.h @@ -37,7 +37,7 @@ public: static std::unique_ptr deserialize(Slice s, std::error_code& ec) { - // Per the RFC, a preimage fulfulliment is defined as + // Per the RFC, a preimage fulfillment is defined as // follows: // // PreimageFulfillment ::= SEQUENCE { diff --git a/src/xrpld/consensus/Consensus.cpp b/src/xrpld/consensus/Consensus.cpp index b71a36d538..46038e9d53 100644 --- a/src/xrpld/consensus/Consensus.cpp +++ b/src/xrpld/consensus/Consensus.cpp @@ -122,7 +122,7 @@ checkConsensusReached( // We only get stalled when there are disputed transactions and all of them // unequivocally have 80% (minConsensusPct) agreement, either for or - // against. That is: either under 20% or over 80% consensus (repectively + // against. That is: either under 20% or over 80% consensus (respectively // "nay" or "yay"). This prevents manipulation by a minority of byzantine // peers of which transactions make the cut to get into the ledger. if (stalled) diff --git a/src/xrpld/core/Config.h b/src/xrpld/core/Config.h index e25148aaa9..29d799bd62 100644 --- a/src/xrpld/core/Config.h +++ b/src/xrpld/core/Config.h @@ -137,7 +137,7 @@ public: // Network parameters uint32_t NETWORK_ID = 0; - // DEPRECATED - Fee units for a reference transction. + // DEPRECATED - Fee units for a reference transaction. // Only provided for backwards compatibility in a couple of places static constexpr std::uint32_t FEE_UNITS_DEPRECATED = 10; diff --git a/src/xrpld/core/detail/SociDB.cpp b/src/xrpld/core/detail/SociDB.cpp index a90e59beed..c04beaff29 100644 --- a/src/xrpld/core/detail/SociDB.cpp +++ b/src/xrpld/core/detail/SociDB.cpp @@ -279,7 +279,7 @@ public: protected: std::uintptr_t const id_; // session is owned by the DatabaseCon parent that holds the checkpointer. - // It is possible (tho rare) for the DatabaseCon class to be destoryed + // It is possible (though rare) for the DatabaseCon class to be destroyed // before the checkpointer. std::weak_ptr session_; std::mutex mutex_; diff --git a/src/xrpld/overlay/detail/PeerImp.cpp b/src/xrpld/overlay/detail/PeerImp.cpp index c92a95149e..53237ed3ae 100644 --- a/src/xrpld/overlay/detail/PeerImp.cpp +++ b/src/xrpld/overlay/detail/PeerImp.cpp @@ -586,7 +586,7 @@ PeerImp::fail(std::string const& reason) if (!socket_.is_open()) return; - // Call to name() locks, log only if the message will be outputed + // Call to name() locks, log only if the message will be outputted if (journal_.active(beast::severities::kWarning)) { std::string const n = name(); diff --git a/src/xrpld/peerfinder/PeerfinderManager.h b/src/xrpld/peerfinder/PeerfinderManager.h index 7a25edcce5..fbb59eab0e 100644 --- a/src/xrpld/peerfinder/PeerfinderManager.h +++ b/src/xrpld/peerfinder/PeerfinderManager.h @@ -97,7 +97,7 @@ struct Config //------------------------------------------------------------------------------ -/** Describes a connectible peer address along with some metadata. */ +/** Describes a connectable peer address along with some metadata. */ struct Endpoint { Endpoint() = default; diff --git a/src/xrpld/peerfinder/README.md b/src/xrpld/peerfinder/README.md index a3f89fd446..806984035b 100644 --- a/src/xrpld/peerfinder/README.md +++ b/src/xrpld/peerfinder/README.md @@ -106,7 +106,7 @@ tuned heuristics. The fields are as follows: precision as an implementation defined percentage of `maxPeers` subject to an implementation defined floor. An instance of the PeerFinder rounds the fractional part up or down using a uniform random number generated at - program startup. This allows the outdegree of the overlay network to be + program startup. This allows the out-degree of the overlay network to be controlled with fractional precision, ensuring that all inbound network connection slots are not consumed (which would make it difficult for new participants to enter the network). @@ -138,7 +138,7 @@ connection test on that neighbor by initiating an outgoing connection to the remote IP address as seen on the connection combined with the port advertised in the Endpoint message. If the test fails, then the peer considers its neighbor firewalled (intentionally or due to misconfiguration) and not forward neighbor -endpoint in Endpoint messages. This prevents poor quality unconnectible +endpoint in Endpoint messages. This prevents poor quality un-connectable addresses from landing in the caches. If the incoming connection test passes, then the peer fills in the Endpoint message with the remote address as seen on the connection before storing it in its cache and forwarding it to other peers. @@ -150,7 +150,7 @@ it no longer has available inbound slots, its address will shortly after stop being handed out by other peers. Livecache entries are very likely to result in both a successful connection establishment and the acquisition of an active outbound slot. Compare this with Bootcache addresses, which are very likely to -be connectible but unlikely to have an open slot. +be connectable but unlikely to have an open slot. Because entries in the Livecache are ephemeral, they are not persisted across launches in the database. The Livecache is continually updated and expired as @@ -186,7 +186,7 @@ since they will have moved towards the core of the overlay over their high uptime. When a connected server is full it will return a handful of new addresses from its Livecache and gracefully close the connection. Addresses from the Livecache are highly likely to have inbound connection slots and be -connectible. +connectable. For security, all information that contributes to the ranking of Bootcache entries is observed locally. PeerFinder never trusts external sources of information. @@ -257,7 +257,7 @@ Slot properties may be combined and are not mutually exclusive. - **Superpeer** (forthcoming) A superpeer slot is a connection to a peer which can accept incoming - connections, meets certain resource availaibility requirements (such as + connections, meets certain resource availability requirements (such as bandwidth, CPU, and storage capacity), and operates full duplex in the overlay. Connections which are not superpeers are by definition leaves. A leaf slot is a connection to a peer which does not route overlay messages to @@ -321,7 +321,7 @@ stage remains active while: PeerFinder makes its best effort to exhaust addresses in the Livecache before moving on to the Bootcache, because Livecache addresses are highly likely -to be connectible (since they are known to have been online within the last +to be connectable (since they are known to have been online within the last minute), and highly likely to have an open slot for an incoming connection (because peers only advertise themselves in the Livecache when they have open slots). @@ -334,7 +334,7 @@ desired. The stage remains active while: - There are addresses in the cache that have not been tried recently. -Entries in the Bootcache are ranked, with highly connectible addresses preferred +Entries in the Bootcache are ranked, with highly connectable addresses preferred over others. Connection attempts to Bootcache addresses are very likely to succeed but unlikely to produce an active connection since the peers likely do not have open slots. Before the remote peer closes the connection it will send diff --git a/src/xrpld/peerfinder/detail/Checker.h b/src/xrpld/peerfinder/detail/Checker.h index 277ce8c74d..700768788a 100644 --- a/src/xrpld/peerfinder/detail/Checker.h +++ b/src/xrpld/peerfinder/detail/Checker.h @@ -14,7 +14,7 @@ namespace xrpl { namespace PeerFinder { -/** Tests remote listening sockets to make sure they are connectible. */ +/** Tests remote listening sockets to make sure they are connectable. */ template class Checker { diff --git a/src/xrpld/peerfinder/detail/Fixed.h b/src/xrpld/peerfinder/detail/Fixed.h index 4c89bc598e..4d4a407873 100644 --- a/src/xrpld/peerfinder/detail/Fixed.h +++ b/src/xrpld/peerfinder/detail/Fixed.h @@ -16,7 +16,7 @@ public: Fixed(Fixed const&) = default; - /** Returns the time after which we shoud allow a connection attempt. */ + /** Returns the time after which we should allow a connection attempt. */ clock_type::time_point const& when() const { diff --git a/src/xrpld/rpc/GRPCHandlers.h b/src/xrpld/rpc/GRPCHandlers.h index f3e8d74f9d..b98b3021a3 100644 --- a/src/xrpld/rpc/GRPCHandlers.h +++ b/src/xrpld/rpc/GRPCHandlers.h @@ -14,7 +14,7 @@ namespace xrpl { * nested inside RPC::GRPCContext, where T is the request type * The return value is the response type, as well as a status * If the status is not Status::OK (meaning an error occurred), then only - * the status will be sent to the client, and the response will be ommitted + * the status will be sent to the client, and the response will be omitted */ std::pair diff --git a/src/xrpld/rpc/detail/Handler.cpp b/src/xrpld/rpc/detail/Handler.cpp index 2000af5e81..1a60c137f7 100644 --- a/src/xrpld/rpc/detail/Handler.cpp +++ b/src/xrpld/rpc/detail/Handler.cpp @@ -173,7 +173,7 @@ Handler const handlerArray[]{ {"validator_info", byRef(&doValidatorInfo), Role::ADMIN, NO_CONDITION}, {"vault_info", byRef(&doVaultInfo), Role::USER, NO_CONDITION}, {"wallet_propose", byRef(&doWalletPropose), Role::ADMIN, NO_CONDITION}, - // Evented methods + // Event methods {"subscribe", byRef(&doSubscribe), Role::USER, NO_CONDITION}, {"unsubscribe", byRef(&doUnsubscribe), Role::USER, NO_CONDITION}, }; diff --git a/src/xrpld/rpc/detail/InfoSub.cpp b/src/xrpld/rpc/detail/InfoSub.cpp index a0869b9d96..c8917b3327 100644 --- a/src/xrpld/rpc/detail/InfoSub.cpp +++ b/src/xrpld/rpc/detail/InfoSub.cpp @@ -8,9 +8,9 @@ namespace xrpl { // should use this interface. The RPC code will primarily be a light wrapper // over this code. -// Eventually, it will check the node's operating mode (synched, unsynched, -// etectera) and defer to the correct means of processing. The current -// code assumes this node is synched (and will continue to do so until +// Eventually, it will check the node's operating mode (synced, unsynced, +// etcetera) and defer to the correct means of processing. The current +// code assumes this node is synced (and will continue to do so until // there's a functional network. InfoSub::InfoSub(Source& source) : m_source(source), mSeq(assign_id()) diff --git a/src/xrpld/rpc/detail/RPCCall.cpp b/src/xrpld/rpc/detail/RPCCall.cpp index fa1a089efb..5eb3943c28 100644 --- a/src/xrpld/rpc/detail/RPCCall.cpp +++ b/src/xrpld/rpc/detail/RPCCall.cpp @@ -1295,7 +1295,7 @@ public: {"wallet_propose", &RPCParser::parseWalletPropose, 0, 1}, {"internal", &RPCParser::parseInternal, 1, -1}, - // Evented methods + // Event methods {"path_find", &RPCParser::parseEvented, -1, -1}, {"subscribe", &RPCParser::parseEvented, -1, -1}, {"unsubscribe", &RPCParser::parseEvented, -1, -1}, diff --git a/src/xrpld/rpc/detail/RPCSub.cpp b/src/xrpld/rpc/detail/RPCSub.cpp index 5d008e4ee6..616911fdfa 100644 --- a/src/xrpld/rpc/detail/RPCSub.cpp +++ b/src/xrpld/rpc/detail/RPCSub.cpp @@ -171,7 +171,7 @@ private: int mSeq; // Next id to allocate. - bool mSending; // Sending threead is active. + bool mSending; // Sending thread is active. std::deque> mDeque; diff --git a/src/xrpld/rpc/detail/TransactionSign.cpp b/src/xrpld/rpc/detail/TransactionSign.cpp index a4ac32ee17..485765c133 100644 --- a/src/xrpld/rpc/detail/TransactionSign.cpp +++ b/src/xrpld/rpc/detail/TransactionSign.cpp @@ -1043,7 +1043,7 @@ transactionSubmit( // Finally, submit the transaction. try { - // FIXME: For performance, should use asynch interface + // FIXME: For performance, should use async interface processTransaction(txn.second, isUnlimited(role), true, failType); } catch (std::exception&) @@ -1439,7 +1439,7 @@ transactionSubmitMultiSigned( // Finally, submit the transaction. try { - // FIXME: For performance, should use asynch interface + // FIXME: For performance, should use async interface processTransaction(txn.second, isUnlimited(role), true, failType); } catch (std::exception&) diff --git a/src/xrpld/rpc/handlers/GatewayBalances.cpp b/src/xrpld/rpc/handlers/GatewayBalances.cpp index 55959d8641..57c73a53e0 100644 --- a/src/xrpld/rpc/handlers/GatewayBalances.cpp +++ b/src/xrpld/rpc/handlers/GatewayBalances.cpp @@ -29,7 +29,7 @@ namespace xrpl { // 3) Object of "assets" indicating accounts that owe the gateway. // (Gateways typically do not hold positive balances. This is unusual.) -// gateway_balances [] [ [] [ [ // limit: integer // optional, number of problems // role: gateway|user // account role to assume -// transactions: true // optional, reccommend transactions +// transactions: true // optional, recommend transactions // } Json::Value doNoRippleCheck(RPC::JsonContext& context)