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/actions/print-env/action.yml b/.github/actions/print-env/action.yml index 6019a6de2f..3527ca6f02 100644 --- a/.github/actions/print-env/action.yml +++ b/.github/actions/print-env/action.yml @@ -11,12 +11,6 @@ runs: echo 'Checking environment variables.' set - echo 'Checking CMake version.' - cmake --version - - echo 'Checking Conan version.' - conan --version - - name: Check configuration (Linux and macOS) if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} shell: bash @@ -27,17 +21,23 @@ runs: echo 'Checking environment variables.' env | sort - echo 'Checking CMake version.' - cmake --version - echo 'Checking compiler version.' ${{ runner.os == 'Linux' && '${CC}' || 'clang' }} --version - echo 'Checking Conan version.' - conan --version - echo 'Checking Ninja version.' ninja --version echo 'Checking nproc version.' nproc --version + + - name: Check configuration (all) + shell: bash + run: | + echo 'Checking Ccache version.' + ccache --version + + echo 'Checking CMake version.' + cmake --version + + echo 'Checking Conan version.' + conan --version 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/.github/scripts/strategy-matrix/generate.py b/.github/scripts/strategy-matrix/generate.py index 79530a1d75..c3d2da1f9f 100755 --- a/.github/scripts/strategy-matrix/generate.py +++ b/.github/scripts/strategy-matrix/generate.py @@ -232,6 +232,8 @@ def generate_strategy_matrix(all: bool, config: Config) -> list: f"-{architecture['platform'][architecture['platform'].find('/') + 1 :]}" ) config_name += f"-{build_type.lower()}" + if "-Dcoverage=ON" in cmake_args: + config_name += "-coverage" if "-Dunity=ON" in cmake_args: config_name += "-unity" diff --git a/.github/scripts/strategy-matrix/linux.json b/.github/scripts/strategy-matrix/linux.json index 331f4e33f6..669754554c 100644 --- a/.github/scripts/strategy-matrix/linux.json +++ b/.github/scripts/strategy-matrix/linux.json @@ -15,196 +15,196 @@ "distro_version": "bookworm", "compiler_name": "gcc", "compiler_version": "12", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "gcc", "compiler_version": "13", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "gcc", "compiler_version": "15", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "16", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "17", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "18", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "19", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "bookworm", "compiler_name": "clang", "compiler_version": "20", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "trixie", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "trixie", "compiler_name": "gcc", "compiler_version": "15", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "trixie", "compiler_name": "clang", "compiler_version": "20", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "debian", "distro_version": "trixie", "compiler_name": "clang", "compiler_version": "21", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "rhel", "distro_version": "8", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "rhel", "distro_version": "8", "compiler_name": "clang", "compiler_version": "any", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "rhel", "distro_version": "9", "compiler_name": "gcc", "compiler_version": "12", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "rhel", "distro_version": "9", "compiler_name": "gcc", "compiler_version": "13", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "rhel", "distro_version": "9", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "rhel", "distro_version": "9", "compiler_name": "clang", "compiler_version": "any", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "rhel", "distro_version": "10", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "rhel", "distro_version": "10", "compiler_name": "clang", "compiler_version": "any", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "ubuntu", "distro_version": "jammy", "compiler_name": "gcc", "compiler_version": "12", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "gcc", "compiler_version": "13", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "gcc", "compiler_version": "14", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "clang", "compiler_version": "16", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "clang", "compiler_version": "17", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "clang", "compiler_version": "18", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" }, { "distro_name": "ubuntu", "distro_version": "noble", "compiler_name": "clang", "compiler_version": "19", - "image_sha": "ca4517d" + "image_sha": "cc09fd3" } ], "build_type": ["Debug", "Release"], diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index ff3d25812a..3aa48ac070 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -114,6 +114,9 @@ jobs: matrix: os: [linux, macos, windows] with: + # Enable ccache only for events targeting the XRPLF repository, since + # other accounts will not have access to our remote cache storage. + ccache_enabled: ${{ github.repository_owner == 'XRPLF' }} os: ${{ matrix.os }} secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/on-trigger.yml b/.github/workflows/on-trigger.yml index b5a56fb671..2c63c2baa5 100644 --- a/.github/workflows/on-trigger.yml +++ b/.github/workflows/on-trigger.yml @@ -68,6 +68,12 @@ jobs: matrix: os: [linux, macos, windows] with: + # Enable ccache only for events targeting the XRPLF repository, since + # other accounts will not have access to our remote cache storage. + # However, we do not enable ccache for events targeting the master or a + # release branch, to protect against the rare case that the output + # produced by ccache is not identical to a regular compilation. + ccache_enabled: ${{ github.repository_owner == 'XRPLF' && !(github.base_ref == 'master' || startsWith(github.base_ref, 'release')) }} os: ${{ matrix.os }} strategy_matrix: ${{ github.event_name == 'schedule' && 'all' || 'minimal' }} secrets: diff --git a/.github/workflows/reusable-build-test-config.yml b/.github/workflows/reusable-build-test-config.yml index a4dc80aae4..575984162e 100644 --- a/.github/workflows/reusable-build-test-config.yml +++ b/.github/workflows/reusable-build-test-config.yml @@ -10,8 +10,14 @@ on: build_type: description: 'The build type to use ("Debug", "Release").' - type: string required: true + type: string + + ccache_enabled: + description: "Whether to enable ccache." + required: false + type: boolean + default: false cmake_args: description: "Additional arguments to pass to CMake." @@ -21,8 +27,8 @@ on: cmake_target: description: "The CMake target to build." - type: string required: true + type: string runs_on: description: Runner to run the job on as a JSON string @@ -66,8 +72,25 @@ jobs: container: ${{ inputs.image != '' && inputs.image || null }} timeout-minutes: 60 env: - ENABLED_VOIDSTAR: ${{ contains(inputs.cmake_args, '-Dvoidstar=ON') }} - ENABLED_COVERAGE: ${{ contains(inputs.cmake_args, '-Dcoverage=ON') }} + # Use a namespace to keep the objects separate for each configuration. + CCACHE_NAMESPACE: ${{ inputs.config_name }} + # Ccache supports both Redis and HTTP endpoints. + # * For Redis, use the following format: redis://ip:port, see + # https://github.com/ccache/ccache/wiki/Redis-storage. Note that TLS is + # not directly supported by ccache, and requires use of a proxy. + # * For HTTP use the following format: http://ip:port/cache when using + # nginx as backend or http://ip:port|layout=bazel when using Bazel + # Remote Cache, see https://github.com/ccache/ccache/wiki/HTTP-storage. + # Note that HTTPS is not directly supported by ccache. + CCACHE_REMOTE_ONLY: true + CCACHE_REMOTE_STORAGE: http://cache.dev.ripplex.io:8080|layout=bazel + # Ignore the creation and modification timestamps on files, since the + # header files are copied into separate directories by CMake, which will + # otherwise result in cache misses. + CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime + # Determine if coverage and voidstar should be enabled. + COVERAGE_ENABLED: ${{ contains(inputs.cmake_args, '-Dcoverage=ON') }} + VOIDSTAR_ENABLED: ${{ contains(inputs.cmake_args, '-Dvoidstar=ON') }} steps: - name: Cleanup workspace (macOS and Windows) if: ${{ runner.os == 'macOS' || runner.os == 'Windows' }} @@ -77,9 +100,13 @@ jobs: uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Prepare runner - uses: XRPLF/actions/.github/actions/prepare-runner@ff9f8f649df5855ffe1a1ae715df43e51807f2e0 + uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6 with: - disable_ccache: false + disable_ccache: ${{ !inputs.ccache_enabled }} + + - name: Set ccache log file + if: ${{ inputs.ccache_enabled && runner.debug == '1' }} + run: echo "CCACHE_LOGFILE=${{ runner.temp }}/ccache.log" >> "${GITHUB_ENV}" - name: Print build environment uses: ./.github/actions/print-env @@ -128,6 +155,15 @@ jobs: --parallel "${BUILD_NPROC}" \ --target "${CMAKE_TARGET}" + - name: Show ccache statistics + if: ${{ inputs.ccache_enabled }} + run: | + ccache --show-stats -vv + if [ '${{ runner.debug }}' = '1' ]; then + cat "${CCACHE_LOGFILE}" + curl ${CCACHE_REMOTE_STORAGE%|*}/status || true + fi + - name: Upload the binary (Linux) if: ${{ github.repository_owner == 'XRPLF' && runner.os == 'Linux' }} uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 @@ -150,7 +186,7 @@ jobs: fi - name: Verify presence of instrumentation (Linux) - if: ${{ runner.os == 'Linux' && env.ENABLED_VOIDSTAR == 'true' }} + if: ${{ runner.os == 'Linux' && env.VOIDSTAR_ENABLED == 'true' }} working-directory: ${{ env.BUILD_DIR }} run: | ./xrpld --version | grep libvoidstar @@ -185,7 +221,7 @@ jobs: netstat -an - name: Prepare coverage report - if: ${{ !inputs.build_only && env.ENABLED_COVERAGE == 'true' }} + if: ${{ !inputs.build_only && env.COVERAGE_ENABLED == 'true' }} working-directory: ${{ env.BUILD_DIR }} env: BUILD_NPROC: ${{ steps.nproc.outputs.nproc }} @@ -198,7 +234,7 @@ jobs: --target coverage - name: Upload coverage report - if: ${{ github.repository_owner == 'XRPLF' && !inputs.build_only && env.ENABLED_COVERAGE == 'true' }} + if: ${{ github.repository_owner == 'XRPLF' && !inputs.build_only && env.COVERAGE_ENABLED == 'true' }} uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 with: disable_search: true diff --git a/.github/workflows/reusable-build-test.yml b/.github/workflows/reusable-build-test.yml index 7f14aacb9b..2b4d38da61 100644 --- a/.github/workflows/reusable-build-test.yml +++ b/.github/workflows/reusable-build-test.yml @@ -8,16 +8,24 @@ name: Build and test on: workflow_call: inputs: + ccache_enabled: + description: "Whether to enable ccache." + required: false + type: boolean + default: false + os: description: 'The operating system to use for the build ("linux", "macos", "windows").' required: true type: string + strategy_matrix: # TODO: Support additional strategies, e.g. "ubuntu" for generating all Ubuntu configurations. description: 'The strategy matrix to use for generating the configurations ("minimal", "all").' required: false type: string default: "minimal" + secrets: CODECOV_TOKEN: description: "The Codecov token to use for uploading coverage reports." @@ -43,6 +51,7 @@ jobs: with: build_only: ${{ matrix.build_only }} build_type: ${{ matrix.build_type }} + ccache_enabled: ${{ inputs.ccache_enabled }} cmake_args: ${{ matrix.cmake_args }} cmake_target: ${{ matrix.cmake_target }} runs_on: ${{ toJSON(matrix.architecture.runner) }} diff --git a/.github/workflows/upload-conan-deps.yml b/.github/workflows/upload-conan-deps.yml index 63cfe5efa9..8a9993d37a 100644 --- a/.github/workflows/upload-conan-deps.yml +++ b/.github/workflows/upload-conan-deps.yml @@ -70,9 +70,9 @@ jobs: uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 - name: Prepare runner - uses: XRPLF/actions/.github/actions/prepare-runner@ff9f8f649df5855ffe1a1ae715df43e51807f2e0 + uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6 with: - disable_ccache: false + disable_ccache: true - name: Print build environment uses: ./.github/actions/print-env 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/CMakeLists.txt b/CMakeLists.txt index 1a96436556..91bb12b0bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,9 @@ elseif(MSVC) add_compile_options(/wd4068) # Ignore unknown pragmas endif() +# Enable ccache to speed up builds. +include(Ccache) + # make GIT_COMMIT_HASH define available to all sources find_package(Git) if(Git_FOUND) 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/Ccache.cmake b/cmake/Ccache.cmake new file mode 100644 index 0000000000..092212075c --- /dev/null +++ b/cmake/Ccache.cmake @@ -0,0 +1,51 @@ +find_program(CCACHE_PATH "ccache") +if (NOT CCACHE_PATH) + return() +endif () + +# For Linux and macOS we can use the ccache binary directly. +if (NOT MSVC) + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PATH}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PATH}") + message(STATUS "Found ccache: ${CCACHE_PATH}") + return() +endif () + +# For Windows more effort is required. The code below is a modified version of +# https://github.com/ccache/ccache/wiki/MS-Visual-Studio#usage-with-cmake. +if ("${CCACHE_PATH}" MATCHES "chocolatey") + message(DEBUG "Ccache path: ${CCACHE_PATH}") + # Chocolatey uses a shim executable that we cannot use directly, in which + # case we have to find the executable it points to. If we cannot find the + # target executable then we cannot use ccache. + find_program(BASH_PATH "bash") + if (NOT BASH_PATH) + message(WARNING "Could not find bash.") + return() + endif () + + execute_process( + COMMAND bash -c "export LC_ALL='en_US.UTF-8'; ${CCACHE_PATH} --shimgen-noop | grep -oP 'path to executable: \\K.+' | head -c -1" + OUTPUT_VARIABLE CCACHE_PATH) + + if (NOT CCACHE_PATH) + message(WARNING "Could not find ccache target.") + return() + endif () + file(TO_CMAKE_PATH "${CCACHE_PATH}" CCACHE_PATH) +endif () +message(STATUS "Found ccache: ${CCACHE_PATH}") + +# Tell cmake to use ccache for compiling with Visual Studio. +file(COPY_FILE + ${CCACHE_PATH} ${CMAKE_BINARY_DIR}/cl.exe + ONLY_IF_DIFFERENT) +set(CMAKE_VS_GLOBALS + "CLToolExe=cl.exe" + "CLToolPath=${CMAKE_BINARY_DIR}" + "TrackFileAccess=false" + "UseMultiToolTask=true") + +# By default Visual Studio generators will use /Zi, which is not compatible with +# ccache, so tell it to use /Z7 instead. +set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$:Embedded>") diff --git a/cmake/XrplCompiler.cmake b/cmake/XrplCompiler.cmake index 110478fadf..622b2d2f74 100644 --- a/cmake/XrplCompiler.cmake +++ b/cmake/XrplCompiler.cmake @@ -149,7 +149,7 @@ elseif (use_gold AND is_gcc) ERROR_QUIET OUTPUT_VARIABLE LD_VERSION) #[=========================================================[ NOTE: THE gold linker inserts -rpath as DT_RUNPATH by - default intead of DT_RPATH, so you might have slightly + default instead of DT_RPATH, so you might have slightly unexpected runtime ld behavior if you were expecting DT_RPATH. Specify --disable-new-dtags to gold if you do not want the default DT_RUNPATH behavior. This rpath diff --git a/cmake/XrplCore.cmake b/cmake/XrplCore.cmake index c0ad676658..4783998f48 100644 --- a/cmake/XrplCore.cmake +++ b/cmake/XrplCore.cmake @@ -207,7 +207,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/IntrusivePointer.h b/include/xrpl/basics/IntrusivePointer.h index 24521b95a7..101a4b6f16 100644 --- a/include/xrpl/basics/IntrusivePointer.h +++ b/include/xrpl/basics/IntrusivePointer.h @@ -58,7 +58,7 @@ concept CAdoptTag = std::is_same_v || When the strong pointer count goes to zero, the "partialDestructor" is called. This can be used to destroy as much of the object as possible while still retaining the reference counts. For example, for SHAMapInnerNodes the - children may be reset in that function. Note that std::shared_poiner WILL + children may be reset in that function. Note that std::shared_pointer WILL run the destructor when the strong count reaches zero, but may not free the memory used by the object until the weak count reaches zero. In rippled, we typically allocate shared pointers with the `make_shared` function. When 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/basics/Slice.h b/include/xrpl/basics/Slice.h index aa98b0a358..fba4b7733c 100644 --- a/include/xrpl/basics/Slice.h +++ b/include/xrpl/basics/Slice.h @@ -152,8 +152,8 @@ public: /** Return a "sub slice" of given length starting at the given position - Note that the subslice encompasses the range [pos, pos + rcount), - where rcount is the smaller of count and size() - pos. + Note that the subslice encompasses the range [pos, pos + rCount), + where rCount is the smaller of count and size() - pos. @param pos position of the first character @count requested length diff --git a/include/xrpl/basics/StringUtilities.h b/include/xrpl/basics/StringUtilities.h index ebe07e43bc..6314a56103 100644 --- a/include/xrpl/basics/StringUtilities.h +++ b/include/xrpl/basics/StringUtilities.h @@ -31,7 +31,7 @@ template std::optional strUnHex(std::size_t strSize, Iterator begin, Iterator end) { - static constexpr std::array const unxtab = []() { + static constexpr std::array const digitLookupTable = []() { std::array t{}; for (auto& x : t) @@ -57,7 +57,7 @@ strUnHex(std::size_t strSize, Iterator begin, Iterator end) if (strSize & 1) { - int c = unxtab[*iter++]; + int c = digitLookupTable[*iter++]; if (c < 0) return {}; @@ -67,12 +67,12 @@ strUnHex(std::size_t strSize, Iterator begin, Iterator end) while (iter != end) { - int cHigh = unxtab[*iter++]; + int cHigh = digitLookupTable[*iter++]; if (cHigh < 0) return {}; - int cLow = unxtab[*iter++]; + int cLow = digitLookupTable[*iter++]; if (cLow < 0) return {}; diff --git a/include/xrpl/beast/container/detail/aged_unordered_container.h b/include/xrpl/beast/container/detail/aged_unordered_container.h index 6807dad9f7..e2ee3b24e0 100644 --- a/include/xrpl/beast/container/detail/aged_unordered_container.h +++ b/include/xrpl/beast/container/detail/aged_unordered_container.h @@ -3189,11 +3189,12 @@ operator==(aged_unordered_container< { if (size() != other.size()) return false; - for (auto iter(cbegin()), last(cend()), olast(other.cend()); iter != last; + for (auto iter(cbegin()), last(cend()), otherLast(other.cend()); + iter != last; ++iter) { - auto oiter(other.find(extract(*iter))); - if (oiter == olast) + auto otherIter(other.find(extract(*iter))); + if (otherIter == otherLast) return false; } return true; 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/beast/hash/hash_append.h b/include/xrpl/beast/hash/hash_append.h index fdfedeb935..28444a1280 100644 --- a/include/xrpl/beast/hash/hash_append.h +++ b/include/xrpl/beast/hash/hash_append.h @@ -203,7 +203,7 @@ struct is_contiguously_hashable Throws: Never Effect: - Returns the reslting hash of all the input data. + Returns the resulting hash of all the input data. */ /** @{ */ diff --git a/include/xrpl/beast/utility/PropertyStream.h b/include/xrpl/beast/utility/PropertyStream.h index a5880fb8c6..de1fc567f3 100644 --- a/include/xrpl/beast/utility/PropertyStream.h +++ b/include/xrpl/beast/utility/PropertyStream.h @@ -376,7 +376,7 @@ public: print statement examples "parent.child" prints child and all of its children "parent.child." start at the parent and print down to child - "parent.grandchild" prints nothing- grandchild not direct discendent + "parent.grandchild" prints nothing- grandchild not direct descendent "parent.grandchild." starts at the parent and prints down to grandchild "parent.grandchild.*" starts at parent, print through grandchild children diff --git a/include/xrpl/json/json_reader.h b/include/xrpl/json/json_reader.h index a660d82e2a..2a8ec5a3fe 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 @@ -68,7 +66,7 @@ public: * error occurred during parsing. */ std::string - getFormatedErrorMessages() const; + getFormattedErrorMessages() const; static constexpr unsigned nest_limit{25}; @@ -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..979e7fd788 100644 --- a/include/xrpl/json/json_value.h +++ b/include/xrpl/json/json_value.h @@ -44,7 +44,7 @@ enum ValueType { class StaticString { public: - constexpr explicit StaticString(char const* czstring) : str_(czstring) + constexpr explicit StaticString(char const* czString) : str_(czString) { } @@ -682,4 +682,4 @@ public: } // namespace Json -#endif // CPPTL_JSON_H_INCLUDED +#endif // XRPL_JSON_JSON_VALUE_H_INCLUDED diff --git a/include/xrpl/json/json_writer.h b/include/xrpl/json/json_writer.h index 9512b17176..08e7b619b2 100644 --- a/include/xrpl/json/json_writer.h +++ b/include/xrpl/json/json_writer.h @@ -90,7 +90,7 @@ private: void writeArrayValue(Value const& value); bool - isMultineArray(Value const& value); + isMultilineArray(Value const& value); void pushValue(std::string const& value); void @@ -157,7 +157,7 @@ private: void writeArrayValue(Value const& value); bool - isMultineArray(Value const& value); + isMultilineArray(Value const& value); void pushValue(std::string const& value); void 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/Manager.h b/include/xrpl/nodestore/Manager.h index fe4b1c614e..72edf2b47e 100644 --- a/include/xrpl/nodestore/Manager.h +++ b/include/xrpl/nodestore/Manager.h @@ -55,7 +55,7 @@ public: HyperLevelDB, LevelDBFactory, SQLite, MDB If the fastBackendParameter is omitted or empty, no ephemeral database - is used. If the scheduler parameter is omited or unspecified, a + is used. If the scheduler parameter is omitted or unspecified, a synchronous scheduler is used which performs all tasks immediately on the caller's thread. 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/IOUAmount.h b/include/xrpl/protocol/IOUAmount.h index bb1b1eae95..154b870f7c 100644 --- a/include/xrpl/protocol/IOUAmount.h +++ b/include/xrpl/protocol/IOUAmount.h @@ -20,7 +20,7 @@ namespace xrpl { Arithmetic operations can throw std::overflow_error during normalization if the amount exceeds the largest representable amount, but underflows - will silently trunctate to zero. + will silently truncate to zero. */ class IOUAmount : private boost::totally_ordered, private boost::additive 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/Permissions.h b/include/xrpl/protocol/Permissions.h index 252605e641..319aeb1c28 100644 --- a/include/xrpl/protocol/Permissions.h +++ b/include/xrpl/protocol/Permissions.h @@ -38,7 +38,7 @@ private: std::unordered_map txFeatureMap_; - std::unordered_map delegatableTx_; + std::unordered_map delegableTx_; std::unordered_map granularPermissionMap_; @@ -71,8 +71,7 @@ public: getTxFeature(TxType txType) const; bool - isDelegatable(std::uint32_t const& permissionValue, Rules const& rules) - const; + isDelegable(std::uint32_t const& permissionValue, Rules const& rules) const; // for tx level permission, permission value is equal to tx type plus one uint32_t diff --git a/include/xrpl/protocol/Protocol.h b/include/xrpl/protocol/Protocol.h index 48284b9fc5..18bf56c3db 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 e11099dcf9..207a1810f7 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 xrpl::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 d68a5071cf..18fa8f9492 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/beast/net/IPAddressV4.cpp b/src/libxrpl/beast/net/IPAddressV4.cpp index b4d7181c45..fcb782133e 100644 --- a/src/libxrpl/beast/net/IPAddressV4.cpp +++ b/src/libxrpl/beast/net/IPAddressV4.cpp @@ -24,7 +24,7 @@ is_public(AddressV4 const& addr) char get_class(AddressV4 const& addr) { - static char const* table = "AAAABBCD"; + static char const* table = "AAAABBCD"; // cspell:disable-line return table[(addr.to_uint() & 0xE0000000) >> 29]; } diff --git a/src/libxrpl/core/detail/LoadMonitor.cpp b/src/libxrpl/core/detail/LoadMonitor.cpp index fe2bb9e359..933fea5877 100644 --- a/src/libxrpl/core/detail/LoadMonitor.cpp +++ b/src/libxrpl/core/detail/LoadMonitor.cpp @@ -66,7 +66,7 @@ LoadMonitor::update() "Imagine if you add 10 to something every second. And you also reduce it by 1/4 every second. It will "idle" at 40, - correponding to 10 counts per second." + corresponding to 10 counts per second." */ do { 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/json/json_reader.cpp b/src/libxrpl/json/json_reader.cpp index c0843ca929..ca0b5e5eee 100644 --- a/src/libxrpl/json/json_reader.cpp +++ b/src/libxrpl/json/json_reader.cpp @@ -241,7 +241,7 @@ Reader::readToken(Token& token) case 'f': token.type_ = tokenFalse; - ok = match("alse", 4); + ok = match("alse", 4); // cspell:disable-line break; case 'n': @@ -912,7 +912,7 @@ Reader::getLocationLineAndColumn(Location location) const } std::string -Reader::getFormatedErrorMessages() const +Reader::getFormattedErrorMessages() const { std::string formattedMessage; @@ -941,7 +941,7 @@ operator>>(std::istream& sin, Value& root) // XRPL_ASSERT(ok, "Json::operator>>() : parse succeeded"); if (!ok) - xrpl::Throw(reader.getFormatedErrorMessages()); + xrpl::Throw(reader.getFormattedErrorMessages()); return sin; } diff --git a/src/libxrpl/json/json_valueiterator.cpp b/src/libxrpl/json/json_valueiterator.cpp index 7d20265af8..e9c22ac5f7 100644 --- a/src/libxrpl/json/json_valueiterator.cpp +++ b/src/libxrpl/json/json_valueiterator.cpp @@ -89,26 +89,26 @@ ValueIteratorBase::copy(SelfType const& other) Value ValueIteratorBase::key() const { - Value::CZString const czstring = (*current_).first; + Value::CZString const czString = (*current_).first; - if (czstring.c_str()) + if (czString.c_str()) { - if (czstring.isStaticString()) - return Value(StaticString(czstring.c_str())); + if (czString.isStaticString()) + return Value(StaticString(czString.c_str())); - return Value(czstring.c_str()); + return Value(czString.c_str()); } - return Value(czstring.index()); + return Value(czString.index()); } UInt ValueIteratorBase::index() const { - Value::CZString const czstring = (*current_).first; + Value::CZString const czString = (*current_).first; - if (!czstring.c_str()) - return czstring.index(); + if (!czString.c_str()) + return czString.index(); return Value::UInt(-1); } diff --git a/src/libxrpl/json/json_writer.cpp b/src/libxrpl/json/json_writer.cpp index 8983257003..2d0756852f 100644 --- a/src/libxrpl/json/json_writer.cpp +++ b/src/libxrpl/json/json_writer.cpp @@ -79,7 +79,7 @@ valueToString(double value) // of precision requested below. char buffer[32]; // Print into the buffer. We need not request the alternative representation - // that always has a decimal point because JSON doesn't distingish the + // that always has a decimal point because JSON doesn't distinguish the // concepts of reals and integers. #if defined(_MSC_VER) && \ defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 @@ -108,7 +108,7 @@ valueToQuotedString(char const* value) // We have to walk value and escape any special characters. // Appending to std::string is not efficient, but this should be rare. // (Note: forward slashes are *not* rare, but I am not escaping them.) - unsigned maxsize = strlen(value) * 2 + 3; // allescaped+quotes+NULL + unsigned maxsize = strlen(value) * 2 + 3; // all-escaped+quotes+NULL std::string result; result.reserve(maxsize); // to avoid lots of mallocs result += "\""; @@ -347,7 +347,7 @@ StyledWriter::writeArrayValue(Value const& value) pushValue("[]"); else { - bool isArrayMultiLine = isMultineArray(value); + bool isArrayMultiLine = isMultilineArray(value); if (isArrayMultiLine) { @@ -398,7 +398,7 @@ StyledWriter::writeArrayValue(Value const& value) } bool -StyledWriter::isMultineArray(Value const& value) +StyledWriter::isMultilineArray(Value const& value) { int size = value.size(); bool isMultiLine = size * 3 >= rightMargin_; @@ -573,7 +573,7 @@ StyledStreamWriter::writeArrayValue(Value const& value) pushValue("[]"); else { - bool isArrayMultiLine = isMultineArray(value); + bool isArrayMultiLine = isMultilineArray(value); if (isArrayMultiLine) { @@ -624,7 +624,7 @@ StyledStreamWriter::writeArrayValue(Value const& value) } bool -StyledStreamWriter::isMultineArray(Value const& value) +StyledStreamWriter::isMultilineArray(Value const& value) { int size = value.size(); bool isMultiLine = size * 3 >= rightMargin_; diff --git a/src/libxrpl/ledger/CredentialHelpers.cpp b/src/libxrpl/ledger/CredentialHelpers.cpp index a0f1dce7d8..82691238f9 100644 --- a/src/libxrpl/ledger/CredentialHelpers.cpp +++ b/src/libxrpl/ledger/CredentialHelpers.cpp @@ -290,7 +290,7 @@ checkArray(STArray const& credentials, unsigned maxSize, beast::Journal j) if (!ins) { JLOG(j.trace()) << "Malformed transaction: " - "duplicates in credenentials."; + "duplicates in credentials."; return temMALFORMED; } } 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/net/RegisterSSLCerts.cpp b/src/libxrpl/net/RegisterSSLCerts.cpp index f489cf29a3..a1321e4c61 100644 --- a/src/libxrpl/net/RegisterSSLCerts.cpp +++ b/src/libxrpl/net/RegisterSSLCerts.cpp @@ -49,11 +49,11 @@ registerSSLCerts( return; } - auto warn = [&](std::string const& mesg) { + auto warn = [&](std::string const& msg) { // Buffer based on asio recommended size char buf[256]; ::ERR_error_string_n(ec.value(), buf, sizeof(buf)); - JLOG(j.warn()) << mesg << " " << buf; + JLOG(j.warn()) << msg << " " << buf; ::ERR_clear_error(); }; diff --git a/src/libxrpl/nodestore/Database.cpp b/src/libxrpl/nodestore/Database.cpp index 41e8ac8632..9ea25785ff 100644 --- a/src/libxrpl/nodestore/Database.cpp +++ b/src/libxrpl/nodestore/Database.cpp @@ -158,7 +158,7 @@ Database::stop() << duration_cast( steady_clock::now() - start) .count() - << " millseconds"; + << " milliseconds"; } void diff --git a/src/libxrpl/protocol/BuildInfo.cpp b/src/libxrpl/protocol/BuildInfo.cpp index 65caa9ecd3..dc56987f3a 100644 --- a/src/libxrpl/protocol/BuildInfo.cpp +++ b/src/libxrpl/protocol/BuildInfo.cpp @@ -34,7 +34,7 @@ char const* const versionString = "3.2.0-b0" #endif #ifdef SANITIZER - BOOST_PP_STRINGIZE(SANITIZER) + BOOST_PP_STRINGIZE(SANITIZER) // cspell: disable-line #endif #endif diff --git a/src/libxrpl/protocol/IOUAmount.cpp b/src/libxrpl/protocol/IOUAmount.cpp index a62bd2853b..b33eaa67b7 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/Indexes.cpp b/src/libxrpl/protocol/Indexes.cpp index 77fcd44a3e..0bdfeefc4d 100644 --- a/src/libxrpl/protocol/Indexes.cpp +++ b/src/libxrpl/protocol/Indexes.cpp @@ -122,9 +122,9 @@ getBookBase(Book const& book) uint256 getQualityNext(uint256 const& uBase) { - static constexpr uint256 nextq( + static constexpr uint256 nextQuality( "0000000000000000000000000000000000000000000000010000000000000000"); - return uBase + nextq; + return uBase + nextQuality; } std::uint64_t diff --git a/src/libxrpl/protocol/Permissions.cpp b/src/libxrpl/protocol/Permissions.cpp index a5d447a23c..55b273e246 100644 --- a/src/libxrpl/protocol/Permissions.cpp +++ b/src/libxrpl/protocol/Permissions.cpp @@ -20,7 +20,7 @@ Permission::Permission() #pragma pop_macro("TRANSACTION") }; - delegatableTx_ = { + delegableTx_ = { #pragma push_macro("TRANSACTION") #undef TRANSACTION @@ -142,7 +142,7 @@ Permission::getTxFeature(TxType txType) const } bool -Permission::isDelegatable( +Permission::isDelegable( std::uint32_t const& permissionValue, Rules const& rules) const { @@ -153,15 +153,15 @@ Permission::isDelegatable( return true; auto const txType = permissionToTxType(permissionValue); - auto const it = delegatableTx_.find(txType); + auto const it = delegableTx_.find(txType); - if (it == delegatableTx_.end()) + if (it == delegableTx_.end()) return false; auto const txFeaturesIt = txFeatureMap_.find(txType); XRPL_ASSERT( txFeaturesIt != txFeatureMap_.end(), - "xrpl::Permissions::isDelegatable : tx exists in txFeatureMap_"); + "xrpl::Permissions::isDelegable : tx exists in txFeatureMap_"); // Delegation is only allowed if the required amendment for the transaction // is enabled. For transactions that do not require an amendment, delegation 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/STXChainBridge.cpp b/src/libxrpl/protocol/STXChainBridge.cpp index 065b87558f..413094b0cd 100644 --- a/src/libxrpl/protocol/STXChainBridge.cpp +++ b/src/libxrpl/protocol/STXChainBridge.cpp @@ -65,12 +65,12 @@ STXChainBridge::STXChainBridge(SField const& name, Json::Value const& v) } auto checkExtra = [](Json::Value const& v) { - static auto const jbridge = + static auto const bridgeJson = xrpl::STXChainBridge().getJson(xrpl::JsonOptions::none); for (auto it = v.begin(); it != v.end(); ++it) { std::string const name = it.memberName(); - if (!jbridge.isMember(name)) + if (!bridgeJson.isMember(name)) { Throw( "STXChainBridge extra field detected: " + name); diff --git a/src/libxrpl/protocol/TxFormats.cpp b/src/libxrpl/protocol/TxFormats.cpp index 12f92615cd..c725c1da69 100644 --- a/src/libxrpl/protocol/TxFormats.cpp +++ b/src/libxrpl/protocol/TxFormats.cpp @@ -36,8 +36,8 @@ TxFormats::TxFormats() #undef TRANSACTION #define UNWRAP(...) __VA_ARGS__ -#define TRANSACTION( \ - tag, value, name, delegatable, amendment, privileges, fields) \ +#define TRANSACTION( \ + tag, value, name, delegable, amendment, privileges, fields) \ add(jss::name, tag, UNWRAP fields, commonFields); #include 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/libxrpl/shamap/SHAMap.cpp b/src/libxrpl/shamap/SHAMap.cpp index 7cfa66b1ac..2a156dc2d4 100644 --- a/src/libxrpl/shamap/SHAMap.cpp +++ b/src/libxrpl/shamap/SHAMap.cpp @@ -186,7 +186,7 @@ SHAMap::finishFetch( catch (...) { JLOG(journal_.warn()) - << "finishFetch exception: unknonw exception: " << hash; + << "finishFetch exception: unknown exception: " << hash; } return {}; diff --git a/src/test/app/AMMClawback_test.cpp b/src/test/app/AMMClawback_test.cpp index e9882ef174..93fda8fe34 100644 --- a/src/test/app/AMMClawback_test.cpp +++ b/src/test/app/AMMClawback_test.cpp @@ -2043,7 +2043,7 @@ class AMMClawback_test : public beast::unit_test::suite void testSingleDepositAndClawback(FeatureBitset features) { - testcase("test single depoit and clawback"); + testcase("test single deposit and clawback"); using namespace jtx; std::string logs; diff --git a/src/test/app/AMMExtended_test.cpp b/src/test/app/AMMExtended_test.cpp index c3bfb46043..317f6cb63d 100644 --- a/src/test/app/AMMExtended_test.cpp +++ b/src/test/app/AMMExtended_test.cpp @@ -2922,29 +2922,29 @@ private: fund(env, gw, {alice, bob, carol}, XRP(10'000)); env.trust(USD(100), alice, bob, carol); env(pay(alice, bob, USD(10)), - delivermin(USD(10)), + deliver_min(USD(10)), ter(temBAD_AMOUNT)); env(pay(alice, bob, USD(10)), - delivermin(USD(-5)), + deliver_min(USD(-5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(alice, bob, USD(10)), - delivermin(XRP(5)), + deliver_min(XRP(5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(alice, bob, USD(10)), - delivermin(Account(carol)["USD"](5)), + deliver_min(Account(carol)["USD"](5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(alice, bob, USD(10)), - delivermin(USD(15)), + deliver_min(USD(15)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(gw, carol, USD(50))); AMM ammCarol(env, carol, XRP(10), USD(15)); env(pay(alice, bob, USD(10)), paths(XRP), - delivermin(USD(7)), + deliver_min(USD(7)), txflags(tfPartialPayment), sendmax(XRP(5)), ter(tecPATH_PARTIAL)); @@ -2962,7 +2962,7 @@ private: AMM ammBob(env, bob, XRP(1'000), USD(1'100)); env(pay(alice, alice, USD(10'000)), paths(XRP), - delivermin(USD(100)), + deliver_min(USD(100)), txflags(tfPartialPayment), sendmax(XRP(100))); env.require(balance(alice, USD(100))); @@ -2976,13 +2976,13 @@ private: AMM ammBob(env, bob, XRP(5'500), USD(1'200)); env(pay(alice, carol, USD(10'000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(1'000)), ter(tecPATH_PARTIAL)); env(pay(alice, carol, USD(10'000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(1'100))); BEAST_EXPECT( @@ -3005,7 +3005,7 @@ private: { env(pay(alice, carol, USD(10'000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(200))); env.require(balance(bob, USD(0))); @@ -3017,7 +3017,7 @@ private: { env(pay(alice, carol, USD(10'000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRPAmount(200'000'001))); env.require(balance(bob, USD(0))); diff --git a/src/test/app/AMM_test.cpp b/src/test/app/AMM_test.cpp index 8d64dfed2a..468d5b3ffd 100644 --- a/src/test/app/AMM_test.cpp +++ b/src/test/app/AMM_test.cpp @@ -831,10 +831,10 @@ private: // Tiny deposit testAMM( [&](AMM& ammAlice, Env& env) { - auto const enabledv1_3 = + auto const enabledV1_3 = env.current()->rules().enabled(fixAMMv1_3); auto const err = - !enabledv1_3 ? ter(temBAD_AMOUNT) : ter(tesSUCCESS); + !enabledV1_3 ? ter(temBAD_AMOUNT) : ter(tesSUCCESS); // Pre-amendment XRP deposit side is rounded to 0 // and deposit fails. // Post-amendment XRP deposit side is rounded to 1 @@ -2818,7 +2818,7 @@ private: BEAST_EXPECT(amm.expectAuctionSlot(100, 0, IOUAmount{0})); // gw burns all but one of its LPTokens through a bid transaction - // this transaction suceeds because the bid price is less than + // this transaction succeeds because the bid price is less than // the total outstanding LPToken balance env(amm.bid({ .account = gw, @@ -2872,7 +2872,7 @@ private: ter(temBAD_AMOUNT)); } - // Invlaid Min/Max combination + // Invalid Min/Max combination env(ammAlice.bid({ .account = carol, .bidMin = 200, @@ -3547,13 +3547,13 @@ private: { auto jtx = env.jt(tx, seq(1), fee(baseFee)); env.app().config().features.erase(featureAMM); - PreflightContext pfctx( + PreflightContext pfCtx( env.app(), *jtx.stx, env.current()->rules(), tapNONE, env.journal); - auto pf = Transactor::invokePreflight(pfctx); + auto pf = Transactor::invokePreflight(pfCtx); BEAST_EXPECT(pf == temDISABLED); env.app().config().features.insert(featureAMM); } @@ -3562,13 +3562,13 @@ private: auto jtx = env.jt(tx, seq(1), fee(baseFee)); jtx.jv["TxnSignature"] = "deadbeef"; jtx.stx = env.ust(jtx); - PreflightContext pfctx( + PreflightContext pfCtx( env.app(), *jtx.stx, env.current()->rules(), tapNONE, env.journal); - auto pf = Transactor::invokePreflight(pfctx); + auto pf = Transactor::invokePreflight(pfCtx); BEAST_EXPECT(pf != tesSUCCESS); } @@ -3577,13 +3577,13 @@ private: jtx.jv["Asset2"]["currency"] = "XRP"; jtx.jv["Asset2"].removeMember("issuer"); jtx.stx = env.ust(jtx); - PreflightContext pfctx( + PreflightContext pfCtx( env.app(), *jtx.stx, env.current()->rules(), tapNONE, env.journal); - auto pf = Transactor::invokePreflight(pfctx); + auto pf = Transactor::invokePreflight(pfCtx); BEAST_EXPECT(pf == temBAD_AMM_TOKENS); } } 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/Check_test.cpp b/src/test/app/Check_test.cpp index b3d8249dd0..8eccdc4824 100644 --- a/src/test/app/Check_test.cpp +++ b/src/test/app/Check_test.cpp @@ -11,18 +11,18 @@ namespace jtx { class expiration { private: - std::uint32_t const expry_; + std::uint32_t const expiry_; public: explicit expiration(NetClock::time_point const& expiry) - : expry_{expiry.time_since_epoch().count()} + : expiry_{expiry.time_since_epoch().count()} { } void operator()(Env&, JTx& jt) const { - jt[sfExpiration.jsonName] = expry_; + jt[sfExpiration.jsonName] = expiry_; } }; diff --git a/src/test/app/Delegate_test.cpp b/src/test/app/Delegate_test.cpp index 7d58093e43..4039f60ef0 100644 --- a/src/test/app/Delegate_test.cpp +++ b/src/test/app/Delegate_test.cpp @@ -203,7 +203,7 @@ class Delegate_test : public beast::unit_test::suite ter(tecNO_TARGET)); } - // non-delegatable transaction + // non-delegable transaction { env(delegate::set(gw, alice, {"SetRegularKey"}), ter(temMALFORMED)); env(delegate::set(gw, alice, {"AccountSet"}), ter(temMALFORMED)); @@ -1693,13 +1693,13 @@ class Delegate_test : public beast::unit_test::suite } void - testTxReqireFeatures(FeatureBitset features) + testTxRequireFeatures(FeatureBitset features) { testcase("test delegate disabled tx"); using namespace jtx; // map of tx and required feature. - // non-delegatable tx are not included. + // non-delegable tx are not included. // NFTokenMint, NFTokenBurn, NFTokenCreateOffer, NFTokenCancelOffer, // NFTokenAcceptOffer are not included, they are tested separately. std::unordered_map txRequiredFeatures{ @@ -1803,7 +1803,7 @@ class Delegate_test : public beast::unit_test::suite testMultiSign(); testMultiSignQuorumNotMet(); testPermissionValue(all); - testTxReqireFeatures(all); + testTxRequireFeatures(all); } }; BEAST_DEFINE_TESTSUITE(Delegate, app, xrpl); diff --git a/src/test/app/DeliverMin_test.cpp b/src/test/app/DeliverMin_test.cpp index 4d643dfae1..c49f83b518 100644 --- a/src/test/app/DeliverMin_test.cpp +++ b/src/test/app/DeliverMin_test.cpp @@ -25,29 +25,29 @@ public: env.trust(USD(100), "alice", "bob", "carol"); env.close(); env(pay("alice", "bob", USD(10)), - delivermin(USD(10)), + deliver_min(USD(10)), ter(temBAD_AMOUNT)); env(pay("alice", "bob", USD(10)), - delivermin(USD(-5)), + deliver_min(USD(-5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay("alice", "bob", USD(10)), - delivermin(XRP(5)), + deliver_min(XRP(5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay("alice", "bob", USD(10)), - delivermin(Account("carol")["USD"](5)), + deliver_min(Account("carol")["USD"](5)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay("alice", "bob", USD(10)), - delivermin(USD(15)), + deliver_min(USD(15)), txflags(tfPartialPayment), ter(temBAD_AMOUNT)); env(pay(gw, "carol", USD(50))); env(offer("carol", XRP(5), USD(5))); env(pay("alice", "bob", USD(10)), paths(XRP), - delivermin(USD(7)), + deliver_min(USD(7)), txflags(tfPartialPayment), sendmax(XRP(5)), ter(tecPATH_PARTIAL)); @@ -66,7 +66,7 @@ public: env(offer("bob", XRP(100), USD(100))); env(pay("alice", "alice", USD(10000)), paths(XRP), - delivermin(USD(100)), + deliver_min(USD(100)), txflags(tfPartialPayment), sendmax(XRP(100))); env.require(balance("alice", USD(100))); @@ -84,13 +84,13 @@ public: env(offer("bob", XRP(10000), USD(100))); env(pay("alice", "carol", USD(10000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(1000)), ter(tecPATH_PARTIAL)); env(pay("alice", "carol", USD(10000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(1100))); env.require(balance("bob", USD(0))); @@ -110,7 +110,7 @@ public: env(offer("dan", XRP(100), USD(100))); env(pay("alice", "carol", USD(10000)), paths(XRP), - delivermin(USD(200)), + deliver_min(USD(200)), txflags(tfPartialPayment), sendmax(XRP(200))); env.require(balance("bob", USD(0))); 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/EscrowToken_test.cpp b/src/test/app/EscrowToken_test.cpp index ff8b2cfb49..955ca8f449 100644 --- a/src/test/app/EscrowToken_test.cpp +++ b/src/test/app/EscrowToken_test.cpp @@ -1591,7 +1591,7 @@ struct EscrowToken_test : public beast::unit_test::suite BEAST_EXPECT(env.balance(bob, USD) == USD(10125)); } - // test cancel doesnt charge rate + // test cancel doesn't charge rate { Env env{*this, features}; auto const baseFee = env.current()->fees().base; @@ -1986,7 +1986,7 @@ struct EscrowToken_test : public beast::unit_test::suite void testIOUINSF(FeatureBitset features) { - testcase("IOU Insuficient Funds"); + testcase("IOU Insufficient Funds"); using namespace test::jtx; using namespace std::literals; diff --git a/src/test/app/Escrow_test.cpp b/src/test/app/Escrow_test.cpp index d4a9fc5b9d..2b7297009a 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(); @@ -1614,12 +1614,12 @@ struct Escrow_test : public beast::unit_test::suite env.close(); env.close(); - // Succeed, Bob doesn't require preauthorization + // Succeed, Bob doesn't require pre-authorization env(escrow::finish(carol, alice, seq), credentials::ids({credIdx})); env.close(); { - char const credType2[] = "fghijk"; + char const credType2[] = "random"; env(credentials::create(bob, zelda, credType2)); 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/Flow_test.cpp b/src/test/app/Flow_test.cpp index e16a48e02f..8c5a9615fa 100644 --- a/src/test/app/Flow_test.cpp +++ b/src/test/app/Flow_test.cpp @@ -952,9 +952,9 @@ struct Flow_test : public beast::unit_test::suite } void - testReexecuteDirectStep(FeatureBitset features) + testReExecuteDirectStep(FeatureBitset features) { - testcase("ReexecuteDirectStep"); + testcase("ReExecuteDirectStep"); using namespace jtx; Env env(*this, features); @@ -1291,7 +1291,7 @@ struct Flow_test : public beast::unit_test::suite testSelfFundedXRPEndpoint(false, features); testSelfFundedXRPEndpoint(true, features); testUnfundedOffer(features); - testReexecuteDirectStep(features); + testReExecuteDirectStep(features); testSelfPayLowQualityOffer(features); testTicketPay(features); } diff --git a/src/test/app/Invariants_test.cpp b/src/test/app/Invariants_test.cpp index 8eb3047dc8..9f70538778 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; @@ -1862,7 +1862,7 @@ class Invariants_test : public beast::unit_test::suite for (auto const& mod : mods) { doInvariantCheck( - {{"changed an unchangable field"}}, + {{"changed an unchangeable field"}}, [&](Account const& A1, Account const&, ApplyContext& ac) { auto sle = ac.view().peek(loanBrokerKeylet); if (!sle) @@ -1892,7 +1892,7 @@ class Invariants_test : public beast::unit_test::suite for (auto const& mod : mods) { doInvariantCheck( - {{"changed an unchangable field"}}, + {{"changed an unchangeable field"}}, [&](Account const& A1, Account const&, ApplyContext& ac) { auto sle = ac.view().peek(keylet::account(A1.id())); if (!sle) @@ -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/Loan_test.cpp b/src/test/app/Loan_test.cpp index 22159ba4bb..7c2e83aa19 100644 --- a/src/test/app/Loan_test.cpp +++ b/src/test/app/Loan_test.cpp @@ -2913,7 +2913,7 @@ protected: /* LoanPay fails with tecINVARIANT_FAILED error when loan_broker(also - borrower) tries to do the payment. Here's the sceanrio: Create a XRP + borrower) tries to do the payment. Here's the scenario: Create a XRP loan with loan broker as borrower, loan origination fee and loan service fee. Loan broker makes the first payment with periodic payment and loan service fee. diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index 1de142c2ab..ed6d861ffb 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 @@ -975,7 +975,7 @@ class MPToken_test : public beast::unit_test::suite sendmax(XRP(100)), ter(temMALFORMED)); env(pay(alice, carol, MPT(100)), - delivermin(XRP(100)), + deliver_min(XRP(100)), ter(temBAD_AMOUNT)); // sendMax MPT is invalid with IOU or XRP auto const USD = alice["USD"]; @@ -986,10 +986,10 @@ class MPToken_test : public beast::unit_test::suite sendmax(MPT(100)), ter(temMALFORMED)); env(pay(alice, carol, USD(100)), - delivermin(MPT(100)), + deliver_min(MPT(100)), ter(temBAD_AMOUNT)); env(pay(alice, carol, XRP(100)), - delivermin(MPT(100)), + deliver_min(MPT(100)), ter(temBAD_AMOUNT)); // sendmax and amount are different MPT issue test::jtx::MPT const MPT1( @@ -1535,13 +1535,13 @@ class MPToken_test : public beast::unit_test::suite // deliver amount < deliverMin env(pay(bob, alice, MPT(100)), sendmax(MPT(99)), - delivermin(MPT(100)), + deliver_min(MPT(100)), txflags(tfPartialPayment), ter(tecPATH_PARTIAL)); // Payment succeeds if deliver amount >= deliverMin env(pay(bob, alice, MPT(100)), sendmax(MPT(99)), - delivermin(MPT(99)), + deliver_min(MPT(99)), txflags(tfPartialPayment)); } @@ -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/MultiSign_test.cpp b/src/test/app/MultiSign_test.cpp index 6e30ed9c13..6950286b52 100644 --- a/src/test/app/MultiSign_test.cpp +++ b/src/test/app/MultiSign_test.cpp @@ -708,7 +708,7 @@ public: void testHeterogeneousSigners(FeatureBitset features) { - testcase("Heterogenious Signers"); + testcase("Heterogenous Signers"); using namespace jtx; Env env{*this, features}; 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/NetworkOPs_test.cpp b/src/test/app/NetworkOPs_test.cpp index d5616009fa..582f9a8084 100644 --- a/src/test/app/NetworkOPs_test.cpp +++ b/src/test/app/NetworkOPs_test.cpp @@ -38,14 +38,14 @@ public: auto const jtx = env.jt(ticket::create(alice, 1), seq(1), fee(10)); - auto transacionId = jtx.stx->getTransactionID(); + auto transactionId = jtx.stx->getTransactionID(); env.app().getHashRouter().setFlags( - transacionId, HashRouterFlags::HELD); + transactionId, HashRouterFlags::HELD); env(jtx, json(jss::Sequence, 1), ter(terNO_ACCOUNT)); env.app().getHashRouter().setFlags( - transacionId, HashRouterFlags::BAD); + transactionId, HashRouterFlags::BAD); env.close(); } diff --git a/src/test/app/Offer_test.cpp b/src/test/app/Offer_test.cpp index 46a2cabec1..f1d68ece1e 100644 --- a/src/test/app/Offer_test.cpp +++ b/src/test/app/Offer_test.cpp @@ -2290,7 +2290,7 @@ public: // clang-format off TestData const tests[]{ - // acct fundXrp bookAmt preTrust offerAmt tec spentXrp balanceUSD offers owners + // acct fundXrp bookAmt preTrust offerAmount tec spentXrp balanceUSD offers owners {"ann", reserve(env, 0) + 0 * f, 1, noPreTrust, 1000, tecUNFUNDED_OFFER, f, USD( 0), 0, 0}, // Account is at the reserve, and will dip below once fees are subtracted. {"bev", reserve(env, 0) + 1 * f, 1, noPreTrust, 1000, tecUNFUNDED_OFFER, f, USD( 0), 0, 0}, // Account has just enough for the reserve and the fee. {"cam", reserve(env, 0) + 2 * f, 0, noPreTrust, 1000, tecINSUF_RESERVE_OFFER, f, USD( 0), 0, 0}, // Account has enough for the reserve, the fee and the offer, and a bit more, but not enough for the reserve after the offer is placed. 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/TheoreticalQuality_test.cpp b/src/test/app/TheoreticalQuality_test.cpp index 5cc03247ae..ed4a62c4b0 100644 --- a/src/test/app/TheoreticalQuality_test.cpp +++ b/src/test/app/TheoreticalQuality_test.cpp @@ -277,7 +277,7 @@ class TheoreticalQuality_test : public beast::unit_test::suite if (actualQ != theoreticalQ && !compareClose(actualQ, theoreticalQ)) { BEAST_EXPECT(actualQ == theoreticalQ); // get the failure - log << "\nAcutal != Theoretical\n"; + log << "\nActual != Theoretical\n"; log << "\nTQ: " << prettyQuality(theoreticalQ) << "\n"; log << "AQ: " << prettyQuality(actualQ) << "\n"; logStrand(log, strand); diff --git a/src/test/app/TxQ_test.cpp b/src/test/app/TxQ_test.cpp index f6ab13e04f..9489bb7f04 100644 --- a/src/test/app/TxQ_test.cpp +++ b/src/test/app/TxQ_test.cpp @@ -4311,7 +4311,7 @@ public: } void - testReexecutePreflight() + testReExecutePreflight() { // The TxQ caches preflight results. But there are situations where // that cache must become invalidated, like if amendments change. @@ -5036,7 +5036,7 @@ public: testScaling(); testInLedgerSeq(); testInLedgerTicket(); - testReexecutePreflight(); + testReExecutePreflight(); testQueueFullDropPenalty(); testCancelQueuedOffers(); testZeroReferenceFee(); 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/app/Vault_test.cpp b/src/test/app/Vault_test.cpp index fbe87ccb5d..f8d76623fd 100644 --- a/src/test/app/Vault_test.cpp +++ b/src/test/app/Vault_test.cpp @@ -1517,7 +1517,7 @@ class Vault_test : public beast::unit_test::suite auto const [asset1, asset2] = std::pair(XRP(10000), USD(10000)); - auto tofund = [&](STAmount const& a) -> STAmount { + auto toFund = [&](STAmount const& a) -> STAmount { if (a.native()) { auto const defXRP = XRP(30000); @@ -1530,8 +1530,8 @@ class Vault_test : public beast::unit_test::suite return defIOU; return a + STAmount{a.issue(), 1000}; }; - auto const toFund1 = tofund(asset1); - auto const toFund2 = tofund(asset2); + auto const toFund1 = toFund(asset1); + auto const toFund2 = toFund(asset2); BEAST_EXPECT(asset1 <= toFund1 && asset2 <= toFund2); if (!asset1.native() && !asset2.native()) diff --git a/src/test/app/XChain_test.cpp b/src/test/app/XChain_test.cpp index 619054b078..3b09845723 100644 --- a/src/test/app/XChain_test.cpp +++ b/src/test/app/XChain_test.cpp @@ -247,7 +247,7 @@ struct BalanceTransfer balance from_; balance to_; - balance payor_; // pays the rewards + balance payer_; // pays the rewards std::vector reward_accounts; // receives the reward XRPAmount txFees_; @@ -255,13 +255,13 @@ struct BalanceTransfer T& env, jtx::Account const& from_acct, jtx::Account const& to_acct, - jtx::Account const& payor, + jtx::Account const& payer, jtx::Account const* payees, size_t num_payees, bool withClaim) : from_(env, from_acct) , to_(env, to_acct) - , payor_(env, payor) + , payer_(env, payer) , reward_accounts([&]() { std::vector r; r.reserve(num_payees); @@ -277,14 +277,14 @@ struct BalanceTransfer T& env, jtx::Account const& from_acct, jtx::Account const& to_acct, - jtx::Account const& payor, + jtx::Account const& payer, std::vector const& payees, bool withClaim) : BalanceTransfer( env, from_acct, to_acct, - payor, + payer, &payees[0], payees.size(), withClaim) @@ -316,14 +316,14 @@ struct BalanceTransfer auto reward_cost = multiply(reward, STAmount(reward_accounts.size()), reward.issue()); return check_most_balances(amt, reward) && - (!check_payer || payor_.diff() == -(reward_cost + txFees_)); + (!check_payer || payer_.diff() == -(reward_cost + txFees_)); } bool has_not_happened() { return check_most_balances(STAmount(0), STAmount(0)) && - payor_.diff() <= txFees_; // could have paid fee for failed claim + payer_.diff() <= txFees_; // could have paid fee for failed claim } }; @@ -592,7 +592,7 @@ struct XChain_test : public beast::unit_test::suite, auto CEUR = C["EUR"]; auto GEUR = scGw["EUR"]; - // Accounts to own single brdiges + // Accounts to own single bridges Account const a1("a1"); Account const a2("a2"); Account const a3("a3"); @@ -2566,7 +2566,7 @@ struct XChain_test : public beast::unit_test::suite, } { // --B5: missing sfAttestationSignerAccount field - // Then submit the one with the field. Should rearch quorum. + // Then submit the one with the field. Should reach quorum. auto att = claim_attestation( scAttester, jvb, @@ -3825,7 +3825,7 @@ struct XChain_test : public beast::unit_test::suite, } // this also checks that only 3 * split_reward was deducted from - // scAlice (the payor account), since we passed alt_payees to + // scAlice (the payer account), since we passed alt_payees to // BalanceTransfer BEAST_EXPECT(transfer.has_happened(amt, split_reward_quorum)); } @@ -3884,7 +3884,7 @@ struct XChain_test : public beast::unit_test::suite, } // this also checks that only 3 * split_reward was deducted from - // scAlice (the payor account), since we passed payees.size() - + // scAlice (the payer account), since we passed payees.size() - // 1 to BalanceTransfer BEAST_EXPECT(transfer.has_happened(amt, split_reward_quorum)); @@ -4548,7 +4548,7 @@ private: enum SmState { st_initial, - st_claimid_created, + st_claim_id_created, st_attesting, st_attested, st_completed, @@ -4864,10 +4864,10 @@ private: { case st_initial: xfer.claim_id = create_claim_id(); - sm_state = st_claimid_created; + sm_state = st_claim_id_created; break; - case st_claimid_created: + case st_claim_id_created: commit(); sm_state = st_attesting; break; diff --git a/src/test/app/tx/apply_test.cpp b/src/test/app/tx/apply_test.cpp index 0b198dcd22..6f9473ce69 100644 --- a/src/test/app/tx/apply_test.cpp +++ b/src/test/app/tx/apply_test.cpp @@ -15,7 +15,7 @@ public: void run() override { - testcase("Require Fully Canonicial Signature"); + testcase("Require Fully Canonical Signature"); testFullyCanonicalSigs(); } 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/beast/xxhasher_test.cpp b/src/test/beast/xxhasher_test.cpp index 7456fc73c4..f740bf0821 100644 --- a/src/test/beast/xxhasher_test.cpp +++ b/src/test/beast/xxhasher_test.cpp @@ -52,7 +52,7 @@ public: } void - testBigObjectWithMultiupleSmallUpdatesWithoutSeed() + testBigObjectWithMultipleSmallUpdatesWithoutSeed() { testcase("Big object with multiple small updates without seed"); xxhasher hasher{}; @@ -69,7 +69,7 @@ public: } void - testBigObjectWithMultiupleSmallUpdatesWithSeed() + testBigObjectWithMultipleSmallUpdatesWithSeed() { testcase("Big object with multiple small updates with seed"); xxhasher hasher{static_cast(103)}; @@ -199,8 +199,8 @@ public: testWithoutSeed(); testWithSeed(); testWithTwoSeeds(); - testBigObjectWithMultiupleSmallUpdatesWithoutSeed(); - testBigObjectWithMultiupleSmallUpdatesWithSeed(); + testBigObjectWithMultipleSmallUpdatesWithoutSeed(); + testBigObjectWithMultipleSmallUpdatesWithSeed(); testBigObjectWithSmallAndBigUpdatesWithoutSeed(); testBigObjectWithSmallAndBigUpdatesWithSeed(); testBigObjectWithOneUpdateWithoutSeed(); 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/NegativeUNL_test.cpp b/src/test/consensus/NegativeUNL_test.cpp index e10d6cbdd0..535aec03bf 100644 --- a/src/test/consensus/NegativeUNL_test.cpp +++ b/src/test/consensus/NegativeUNL_test.cpp @@ -25,7 +25,7 @@ namespace test { /** * Test the size of the negative UNL in a ledger, - * also test if the ledger has ToDisalbe and/or ToReEnable + * also test if the ledger has ToDisable and/or ToReEnable * * @param l the ledger * @param size the expected negative UNL size @@ -553,11 +553,11 @@ struct NetworkHistory bool createLedgerHistory() { - static uint256 fake_amemdment; // So we have different genesis ledgers + static uint256 fake_amendment; // So we have different genesis ledgers auto l = std::make_shared( create_genesis, env.app().config(), - std::vector{fake_amemdment++}, + std::vector{fake_amendment++}, env.app().getNodeFamily()); history.push_back(l); 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/core/Config_test.cpp b/src/test/core/Config_test.cpp index 139e8702eb..d6ec875982 100644 --- a/src/test/core/Config_test.cpp +++ b/src/test/core/Config_test.cpp @@ -206,8 +206,8 @@ nHBu9PTL9dn2GuZtdW4U2WzBwffyX9qsQCd9CNU4Z5YG3PQfViM8 nHUPDdcdb2Y5DZAJne4c2iabFuAP3F34xZUgYQT2NH7qfkdapgnz [validator_list_sites] -recommendedxrplvalidators.com -morexrplvalidators.net +recommended-xrpl-validators.com +more-xrpl-validators.net [validator_list_keys] 03E74EE14CB525AFBB9F1B7D86CD58ECC4B91452294B42AB4E78F260BD905C091D 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/Digraph.h b/src/test/csf/Digraph.h index 688d0528d3..a283f2f7cc 100644 --- a/src/test/csf/Digraph.h +++ b/src/test/csf/Digraph.h @@ -199,7 +199,7 @@ public: Save a GraphViz dot description of the graph @param fileName The output file (creates) - @param vertexName A invokable T vertexName(Vertex const &) that + @param vertexName A invocable T vertexName(Vertex const &) that returns the name target use for the vertex in the file T must be ostream-able */ 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/csf/Peer.h b/src/test/csf/Peer.h index b2a0c3b3ed..b86991ba5f 100644 --- a/src/test/csf/Peer.h +++ b/src/test/csf/Peer.h @@ -722,7 +722,7 @@ struct Peer template struct BroadcastMesg { - M mesg; + M msg; std::size_t seq; PeerID origin; }; @@ -748,7 +748,7 @@ struct Peer // used on the other end if (link.target->router.lastObservedSeq[bm.origin] < bm.seq) { - issue(Relay{link.target->id, bm.mesg}); + issue(Relay{link.target->id, bm.msg}); net.send( this, link.target, @@ -765,12 +765,12 @@ struct Peer void receive(BroadcastMesg const& bm, PeerID from) { - issue(Receive{from, bm.mesg}); + issue(Receive{from, bm.msg}); if (router.lastObservedSeq[bm.origin] < bm.seq) { router.lastObservedSeq[bm.origin] = bm.seq; - schedule(delays.onReceive(bm.mesg), [this, bm, from] { - if (handle(bm.mesg)) + schedule(delays.onReceive(bm.msg), [this, bm, from] { + if (handle(bm.msg)) send(bm, from); }); } diff --git a/src/test/csf/PeerGroup.h b/src/test/csf/PeerGroup.h index e674581546..8a215eaf8d 100644 --- a/src/test/csf/PeerGroup.h +++ b/src/test/csf/PeerGroup.h @@ -193,7 +193,7 @@ public: /** Establish network connections based on trust relations For each peers in this group, create outbound network connection - to the set of peers it trusts. If a coonnection already exists, it is + to the set of peers it trusts. If a connection already exists, it is not recreated. @param delay The fixed messaging delay for all established connections diff --git a/src/test/jtx/Env_test.cpp b/src/test/jtx/Env_test.cpp index ba5a2ee8c5..fbe51c2a8d 100644 --- a/src/test/jtx/Env_test.cpp +++ b/src/test/jtx/Env_test.cpp @@ -33,7 +33,7 @@ public: { using namespace jtx; { - Account a("chenna"); + Account a("chad"); Account b(a); a = b; a = std::move(b); @@ -162,8 +162,8 @@ public: // flags env.fund(n, noripple("xavier")); env.require(nflags("xavier", asfDefaultRipple)); - env.fund(n, "yana"); - env.require(flags("yana", asfDefaultRipple)); + env.fund(n, "zachary"); + env.require(flags("zachary", asfDefaultRipple)); } // trust @@ -596,12 +596,9 @@ public: using namespace jtx; Env env(*this); env.fund(XRP(10000), "alice"); - env(noop("alice"), memodata("data")); - env(noop("alice"), memoformat("format")); - env(noop("alice"), memotype("type")); - env(noop("alice"), memondata("format", "type")); - env(noop("alice"), memonformat("data", "type")); - env(noop("alice"), memontype("data", "format")); + env(noop("alice"), memo_data("data")); + env(noop("alice"), memo_format("format")); + env(noop("alice"), memo_type("type")); env(noop("alice"), memo("data", "format", "type")); env(noop("alice"), memo("data1", "format1", "type1"), diff --git a/src/test/jtx/Oracle.h b/src/test/jtx/Oracle.h index fc7dc89cd1..17d72384f6 100644 --- a/src/test/jtx/Oracle.h +++ b/src/test/jtx/Oracle.h @@ -132,7 +132,7 @@ public: std::optional const& quoteAsset, std::optional const& oracles = std::nullopt, std::optional const& trim = std::nullopt, - std::optional const& timeTreshold = std::nullopt); + std::optional const& timeThreshold = std::nullopt); std::uint32_t documentID() const @@ -150,7 +150,7 @@ public: exists(Env& env, AccountID const& account, std::uint32_t documentID); [[nodiscard]] bool - expectPrice(DataSeries const& pricess) const; + expectPrice(DataSeries const& prices) const; [[nodiscard]] bool expectLastUpdateTime(std::uint32_t lastUpdateTime) const; 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/amount.h b/src/test/jtx/amount.h index faf70921be..a310fc5b44 100644 --- a/src/test/jtx/amount.h +++ b/src/test/jtx/amount.h @@ -277,7 +277,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). May be fractional. */ diff --git a/src/test/jtx/delivermin.h b/src/test/jtx/delivermin.h index 70f092c9dc..033b3f20b8 100644 --- a/src/test/jtx/delivermin.h +++ b/src/test/jtx/delivermin.h @@ -10,13 +10,13 @@ namespace test { namespace jtx { /** Sets the DeliverMin on a JTx. */ -class delivermin +class deliver_min { private: STAmount amount_; public: - delivermin(STAmount const& amount) : amount_(amount) + deliver_min(STAmount const& amount) : amount_(amount) { } 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/impl/AMMTest.cpp b/src/test/jtx/impl/AMMTest.cpp index 790762d3df..de7ce5504b 100644 --- a/src/test/jtx/impl/AMMTest.cpp +++ b/src/test/jtx/impl/AMMTest.cpp @@ -112,7 +112,7 @@ AMMTestBase::testAMM( auto const [asset1, asset2] = arg.pool ? *arg.pool : std::make_pair(XRP(10000), USD(10000)); - auto tofund = [&](STAmount const& a) -> STAmount { + auto toFund = [&](STAmount const& a) -> STAmount { if (a.native()) { auto const defXRP = XRP(30000); @@ -125,8 +125,8 @@ AMMTestBase::testAMM( return defIOU; return a + STAmount{a.issue(), 1000}; }; - auto const toFund1 = tofund(asset1); - auto const toFund2 = tofund(asset2); + auto const toFund1 = toFund(asset1); + auto const toFund2 = toFund(asset2); BEAST_EXPECT(asset1 <= toFund1 && asset2 <= toFund2); if (!asset1.native() && !asset2.native()) diff --git a/src/test/jtx/impl/delivermin.cpp b/src/test/jtx/impl/delivermin.cpp index 5ad98edd09..a5c1414525 100644 --- a/src/test/jtx/impl/delivermin.cpp +++ b/src/test/jtx/impl/delivermin.cpp @@ -7,7 +7,7 @@ namespace test { namespace jtx { void -delivermin::operator()(Env& env, JTx& jt) const +deliver_min::operator()(Env& env, JTx& jt) const { jt.jv[jss::DeliverMin] = amount_.getJson(JsonOptions::none); } diff --git a/src/test/jtx/impl/memo.cpp b/src/test/jtx/impl/memo.cpp index c815b916d7..e503b9a073 100644 --- a/src/test/jtx/impl/memo.cpp +++ b/src/test/jtx/impl/memo.cpp @@ -17,7 +17,7 @@ memo::operator()(Env&, JTx& jt) const } void -memodata::operator()(Env&, JTx& jt) const +memo_data::operator()(Env&, JTx& jt) const { auto& jv = jt.jv; auto& ma = jv["Memos"]; @@ -27,7 +27,7 @@ memodata::operator()(Env&, JTx& jt) const } void -memoformat::operator()(Env&, JTx& jt) const +memo_format::operator()(Env&, JTx& jt) const { auto& jv = jt.jv; auto& ma = jv["Memos"]; @@ -37,7 +37,7 @@ memoformat::operator()(Env&, JTx& jt) const } void -memotype::operator()(Env&, JTx& jt) const +memo_type::operator()(Env&, JTx& jt) const { auto& jv = jt.jv; auto& ma = jv["Memos"]; @@ -46,39 +46,6 @@ memotype::operator()(Env&, JTx& jt) const m["MemoType"] = strHex(s_); } -void -memondata::operator()(Env&, JTx& jt) const -{ - auto& jv = jt.jv; - auto& ma = jv["Memos"]; - auto& mi = ma[ma.size()]; - auto& m = mi["Memo"]; - m["MemoFormat"] = strHex(format_); - m["MemoType"] = strHex(type_); -} - -void -memonformat::operator()(Env&, JTx& jt) const -{ - auto& jv = jt.jv; - auto& ma = jv["Memos"]; - auto& mi = ma[ma.size()]; - auto& m = mi["Memo"]; - m["MemoData"] = strHex(data_); - m["MemoType"] = strHex(type_); -} - -void -memontype::operator()(Env&, JTx& jt) const -{ - auto& jv = jt.jv; - auto& ma = jv["Memos"]; - auto& mi = ma[ma.size()]; - auto& m = mi["Memo"]; - m["MemoData"] = strHex(data_); - m["MemoFormat"] = strHex(format_); -} - } // namespace jtx } // namespace test } // namespace xrpl diff --git a/src/test/jtx/memo.h b/src/test/jtx/memo.h index 377dcbec4e..2506f063fc 100644 --- a/src/test/jtx/memo.h +++ b/src/test/jtx/memo.h @@ -32,13 +32,13 @@ public: operator()(Env&, JTx& jt) const; }; -class memodata +class memo_data { private: std::string s_; public: - memodata(std::string const& s) : s_(s) + memo_data(std::string const& s) : s_(s) { } @@ -46,13 +46,13 @@ public: operator()(Env&, JTx& jt) const; }; -class memoformat +class memo_format { private: std::string s_; public: - memoformat(std::string const& s) : s_(s) + memo_format(std::string const& s) : s_(s) { } @@ -60,61 +60,13 @@ public: operator()(Env&, JTx& jt) const; }; -class memotype +class memo_type { private: std::string s_; public: - memotype(std::string const& s) : s_(s) - { - } - - void - operator()(Env&, JTx& jt) const; -}; - -class memondata -{ -private: - std::string format_; - std::string type_; - -public: - memondata(std::string const& format, std::string const& type) - : format_(format), type_(type) - { - } - - void - operator()(Env&, JTx& jt) const; -}; - -class memonformat -{ -private: - std::string data_; - std::string type_; - -public: - memonformat(std::string const& data, std::string const& type) - : data_(data), type_(type) - { - } - - void - operator()(Env&, JTx& jt) const; -}; - -class memontype -{ -private: - std::string data_; - std::string format_; - -public: - memontype(std::string const& data, std::string const& format) - : data_(data), format_(format) + memo_type(std::string const& s) : s_(s) { } 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/protocol/TER_test.cpp b/src/test/protocol/TER_test.cpp index 0d9c6cb96d..56b3b08051 100644 --- a/src/test/protocol/TER_test.cpp +++ b/src/test/protocol/TER_test.cpp @@ -137,7 +137,7 @@ struct TER_test : public beast::unit_test::suite testIterate(terEnums, *this); // Lambda that verifies assignability and convertibility. - auto isConvertable = [](auto from, auto to) { + auto isConvertible = [](auto from, auto to) { using From_t = std::decay_t; using To_t = std::decay_t; static_assert( @@ -150,12 +150,12 @@ struct TER_test : public beast::unit_test::suite // Verify the right types convert to NotTEC. NotTEC const notTec; - isConvertable(telLOCAL_ERROR, notTec); - isConvertable(temMALFORMED, notTec); - isConvertable(tefFAILURE, notTec); - isConvertable(terRETRY, notTec); - isConvertable(tesSUCCESS, notTec); - isConvertable(notTec, notTec); + isConvertible(telLOCAL_ERROR, notTec); + isConvertible(temMALFORMED, notTec); + isConvertible(tefFAILURE, notTec); + isConvertible(terRETRY, notTec); + isConvertible(tesSUCCESS, notTec); + isConvertible(notTec, notTec); // Lambda that verifies types and not assignable or convertible. auto notConvertible = [](auto from, auto to) { @@ -176,14 +176,14 @@ struct TER_test : public beast::unit_test::suite notConvertible(4, notTec); // Verify the right types convert to TER. - isConvertable(telLOCAL_ERROR, ter); - isConvertable(temMALFORMED, ter); - isConvertable(tefFAILURE, ter); - isConvertable(terRETRY, ter); - isConvertable(tesSUCCESS, ter); - isConvertable(tecCLAIM, ter); - isConvertable(notTec, ter); - isConvertable(ter, ter); + isConvertible(telLOCAL_ERROR, ter); + isConvertible(temMALFORMED, ter); + isConvertible(tefFAILURE, ter); + isConvertible(terRETRY, ter); + isConvertible(tesSUCCESS, ter); + isConvertible(tecCLAIM, ter); + isConvertible(notTec, ter); + isConvertible(ter, ter); // Verify that you can't convert from int to ter. notConvertible(4, ter); 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/AccountTx_test.cpp b/src/test/rpc/AccountTx_test.cpp index e387e1bc4c..36d29236d1 100644 --- a/src/test/rpc/AccountTx_test.cpp +++ b/src/test/rpc/AccountTx_test.cpp @@ -551,12 +551,12 @@ class AccountTx_test : public beast::unit_test::suite auto escrow = [](Account const& account, Account const& to, STAmount const& amount) { - Json::Value escro; - escro[jss::TransactionType] = jss::EscrowCreate; - escro[jss::Account] = account.human(); - escro[jss::Destination] = to.human(); - escro[jss::Amount] = amount.getJson(JsonOptions::none); - return escro; + Json::Value escrow; + escrow[jss::TransactionType] = jss::EscrowCreate; + escrow[jss::Account] = account.human(); + escrow[jss::Destination] = to.human(); + escrow[jss::Amount] = amount.getJson(JsonOptions::none); + return escrow; }; NetClock::time_point const nextTime{env.now() + 2s}; @@ -651,7 +651,7 @@ class AccountTx_test : public beast::unit_test::suite env.close(); } { - // Deposit preauthorization with a Ticket. + // Deposit pre-authorization with a Ticket. std::uint32_t const tktSeq{env.seq(alice) + 1}; env(ticket::create(alice, 1), sig(alie)); env.close(); @@ -788,19 +788,19 @@ class AccountTx_test : public beast::unit_test::suite BEAST_EXPECT(result[jss::result][jss::transactions].isArray()); // The first two transactions listed in sanity haven't happened yet. - constexpr unsigned int beckyDeletedOffest = 2; + constexpr unsigned int beckyDeletedOffset = 2; BEAST_EXPECT( std::size(sanity) == result[jss::result][jss::transactions].size() + - beckyDeletedOffest); + beckyDeletedOffset); Json::Value const& txs{result[jss::result][jss::transactions]}; - for (unsigned int index = beckyDeletedOffest; + for (unsigned int index = beckyDeletedOffset; index < std::size(sanity); ++index) { - checkSanity(txs[index - beckyDeletedOffest], sanity[index]); + checkSanity(txs[index - beckyDeletedOffset], sanity[index]); } } diff --git a/src/test/rpc/Book_test.cpp b/src/test/rpc/Book_test.cpp index 3c7477745b..ae2aff689d 100644 --- a/src/test/rpc/Book_test.cpp +++ b/src/test/rpc/Book_test.cpp @@ -1719,7 +1719,7 @@ public: BEAST_EXPECT(jrr[jss::offers].isArray()); BEAST_EXPECT( jrr[jss::offers].size() == - (asAdmin ? RPC::Tuning::bookOffers.rdefault : 0u)); + (asAdmin ? RPC::Tuning::bookOffers.rDefault : 0u)); } void diff --git a/src/test/rpc/DepositAuthorized_test.cpp b/src/test/rpc/DepositAuthorized_test.cpp index 968a3fd4dc..3e082a70a1 100644 --- a/src/test/rpc/DepositAuthorized_test.cpp +++ b/src/test/rpc/DepositAuthorized_test.cpp @@ -555,7 +555,7 @@ public: testcase("deposit_authorized with expired credentials"); // check expired credentials - char const credType2[] = "fghijk"; + char const credType2[] = "random"; std::uint32_t const x = env.current() ->header() .parentCloseTime.time_since_epoch() diff --git a/src/test/rpc/JSONRPC_test.cpp b/src/test/rpc/JSONRPC_test.cpp index 4d3f0a5098..6a9fae74a5 100644 --- a/src/test/rpc/JSONRPC_test.cpp +++ b/src/test/rpc/JSONRPC_test.cpp @@ -54,7 +54,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Minimal payment, no Amount only DeliverMax", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "secret": "masterpassphrase", "tx_json": { "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", @@ -71,7 +71,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Pass in Fee with minimal payment, both Amount and DeliverMax.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -91,7 +91,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Pass in Sequence, no Amount only DeliverMax", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -111,7 +111,7 @@ static constexpr TxnTestData txnTestArray[] = { "DeliverMax.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -133,7 +133,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Add 'fee_mult_max' field.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": 7, @@ -153,7 +153,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Add 'fee_mult_max' and 'fee_div_max' field.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": 7, @@ -174,7 +174,7 @@ static constexpr TxnTestData txnTestArray[] = { {"fee_mult_max is ignored if 'Fee' is present.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": 0, @@ -196,7 +196,7 @@ static constexpr TxnTestData txnTestArray[] = { {"fee_div_max is ignored if 'Fee' is present.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": 100, @@ -219,7 +219,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid 'fee_mult_max' field.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": "NotAFeeMultiplier", @@ -239,7 +239,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid 'fee_div_max' field.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": 5, @@ -260,7 +260,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid value for 'fee_mult_max' field.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": 0, @@ -280,7 +280,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid value for 'fee_div_max' field.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": 4, @@ -301,7 +301,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid zero value for 'fee_div_max' field.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "fee_mult_max": 4, @@ -322,7 +322,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'Amount'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -339,7 +339,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid 'Amount'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -357,7 +357,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'Destination'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -374,7 +374,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid 'Destination'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -392,7 +392,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Cannot create XRP to XRP paths.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "build_path": 1, @@ -411,7 +411,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Successful 'build_path'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "build_path": 1, @@ -434,7 +434,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Not valid to include both 'Paths' and 'build_path'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "build_path": 1, @@ -458,7 +458,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Successful 'SendMax'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "build_path": 1, @@ -486,7 +486,7 @@ static constexpr TxnTestData txnTestArray[] = { {"'Amount' may not be XRP for pathfinding, but 'SendMax' may be XRP.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "build_path": 1, @@ -510,7 +510,7 @@ static constexpr TxnTestData txnTestArray[] = { {"'secret' must be present.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "tx_json": { "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", @@ -527,7 +527,7 @@ static constexpr TxnTestData txnTestArray[] = { {"'secret' must be non-empty.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "", "tx_json": { @@ -545,7 +545,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Use 'seed' instead of 'secret'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi", "key_type": "ed25519", "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd", @@ -564,7 +564,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Malformed 'seed'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi", "key_type": "ed25519", "seed": "not a seed", @@ -583,7 +583,7 @@ static constexpr TxnTestData txnTestArray[] = { {"'tx_json' must be present.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "rx_json": { @@ -601,7 +601,7 @@ static constexpr TxnTestData txnTestArray[] = { {"'TransactionType' must be present.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -618,7 +618,7 @@ static constexpr TxnTestData txnTestArray[] = { {"The 'TransactionType' must be a pre-established transaction type.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -636,7 +636,7 @@ static constexpr TxnTestData txnTestArray[] = { {"The 'TransactionType' may be represented with an integer.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -654,7 +654,7 @@ static constexpr TxnTestData txnTestArray[] = { {"'Account' must be present.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -671,7 +671,7 @@ static constexpr TxnTestData txnTestArray[] = { {"'Account' must be well formed.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -689,7 +689,7 @@ static constexpr TxnTestData txnTestArray[] = { {"The 'offline' tag may be added to the transaction.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "offline": 0, @@ -708,7 +708,7 @@ static constexpr TxnTestData txnTestArray[] = { {"If 'offline' is true then a 'Sequence' field must be supplied.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "offline": 1, @@ -728,7 +728,7 @@ static constexpr TxnTestData txnTestArray[] = { {"If 'offline' is true then a 'Fee' field must be supplied.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "offline": 1, @@ -748,7 +748,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Valid transaction if 'offline' is true.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "offline": 1, @@ -770,7 +770,7 @@ static constexpr TxnTestData txnTestArray[] = { {"'offline' and 'build_path' are mutually exclusive.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "offline": 1, @@ -792,7 +792,7 @@ static constexpr TxnTestData txnTestArray[] = { {"A 'Flags' field may be specified.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -811,7 +811,7 @@ static constexpr TxnTestData txnTestArray[] = { {"The 'Flags' field must be numeric.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -830,7 +830,7 @@ static constexpr TxnTestData txnTestArray[] = { {"It's okay to add a 'debug_signing' field.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "debug_signing": 0, @@ -849,7 +849,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Single-sign a multisigned transaction.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux", "secret": "a", "tx_json": { @@ -879,7 +879,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Minimal sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -900,7 +900,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Minimal offline sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "offline": 1, @@ -919,7 +919,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Offline sign_for using 'seed' instead of 'secret'.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi", "key_type": "ed25519", "seed": "sh1yJfwoi98zCygwijUzuHmJDeVKd", @@ -939,7 +939,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Malformed seed in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rJrxi4Wxev4bnAGVNP9YCdKPdAoKfAmcsi", "key_type": "ed25519", "seed": "sh1yJfwoi98zCygwjUzuHmJDeVKd", @@ -962,7 +962,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'Account' in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -982,7 +982,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'Amount' in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1002,7 +1002,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'Destination' in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1022,7 +1022,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'Destination' in sign_for, use DeliverMax", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1042,7 +1042,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'Fee' in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1062,7 +1062,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'Sequence' in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1082,7 +1082,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'SigningPubKey' in sign_for is automatically filled in.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1102,7 +1102,7 @@ static constexpr TxnTestData txnTestArray[] = { {"In sign_for, an account may not sign for itself.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA", "secret": "a", "tx_json": { @@ -1123,7 +1123,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Cannot put duplicate accounts in Signers array", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1154,7 +1154,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Correctly append to pre-established Signers array", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux", "secret": "c", "tx_json": { @@ -1181,7 +1181,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Append to pre-established Signers array with bad signature", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux", "secret": "c", "tx_json": { @@ -1211,7 +1211,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Non-empty 'SigningPubKey' in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1232,7 +1232,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Missing 'TransactionType' in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": { @@ -1252,7 +1252,7 @@ static constexpr TxnTestData txnTestArray[] = { {"TxnSignature in sign_for.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux", "secret": "c", "tx_json": { @@ -1283,7 +1283,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid field 'tx_json': string instead of object", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": "" @@ -1296,7 +1296,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid field 'tx_json': integer instead of object", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": 20160331 @@ -1309,7 +1309,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Invalid field 'tx_json': array instead of object", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "tx_json": [ "hello", "world" ] @@ -1322,7 +1322,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Pass in Fee with minimal payment, both Amount and DeliverMax.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "r9zN9x52FiCFAcicCLMQKbj1nxYhxJbbSy", "secret": "ssgN6zTvtM1q9XV8DvJpWm8LBYWiY", "tx_json": { @@ -2003,7 +2003,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Payment cannot specify different DeliverMax and Amount.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "debug_signing": 0, @@ -2025,7 +2025,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Payment cannot specify bad DomainID.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", "secret": "masterpassphrase", "debug_signing": 0, @@ -2048,7 +2048,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Minimal delegated transaction.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "secret": "a", "tx_json": { "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", @@ -2066,7 +2066,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Delegate not well formed.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "secret": "a", "tx_json": { "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", @@ -2084,7 +2084,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Delegate not in ledger.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "secret": "a", "tx_json": { "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", @@ -2102,7 +2102,7 @@ static constexpr TxnTestData txnTestArray[] = { {"Delegate and secret not match.", __LINE__, R"({ - "command": "doesnt_matter", + "command": "dummy_command", "secret": "aa", "tx_json": { "Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", 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/RPCCall_test.cpp b/src/test/rpc/RPCCall_test.cpp index 682584f40b..85402ff024 100644 --- a/src/test/rpc/RPCCall_test.cpp +++ b/src/test/rpc/RPCCall_test.cpp @@ -3921,7 +3921,7 @@ static RPCCallTestData const rpcCallTestArray[] = { } ] })"}, - {"log_level: partiton_name.", + {"log_level: partition_name.", __LINE__, {"log_level", "partition_name", "fatal"}, RPCCallTestData::no_exception, diff --git a/src/test/rpc/Simulate_test.cpp b/src/test/rpc/Simulate_test.cpp index 2a85e2a928..7fe90fb9a1 100644 --- a/src/test/rpc/Simulate_test.cpp +++ b/src/test/rpc/Simulate_test.cpp @@ -261,7 +261,7 @@ class Simulate_test : public beast::unit_test::suite { // `seed` field included Json::Value params = Json::objectValue; - params[jss::seed] = "doesnt_matter"; + params[jss::seed] = "random_data"; Json::Value tx_json = Json::objectValue; tx_json[jss::TransactionType] = jss::AccountSet; tx_json[jss::Account] = env.master.human(); @@ -274,7 +274,7 @@ class Simulate_test : public beast::unit_test::suite { // `secret` field included Json::Value params = Json::objectValue; - params[jss::secret] = "doesnt_matter"; + params[jss::secret] = "random_data"; Json::Value tx_json = Json::objectValue; tx_json[jss::TransactionType] = jss::AccountSet; tx_json[jss::Account] = env.master.human(); @@ -287,7 +287,7 @@ class Simulate_test : public beast::unit_test::suite { // `seed_hex` field included Json::Value params = Json::objectValue; - params[jss::seed_hex] = "doesnt_matter"; + params[jss::seed_hex] = "random_data"; Json::Value tx_json = Json::objectValue; tx_json[jss::TransactionType] = jss::AccountSet; tx_json[jss::Account] = env.master.human(); @@ -300,7 +300,7 @@ class Simulate_test : public beast::unit_test::suite { // `passphrase` field included Json::Value params = Json::objectValue; - params[jss::passphrase] = "doesnt_matter"; + params[jss::passphrase] = "random_data"; Json::Value tx_json = Json::objectValue; tx_json[jss::TransactionType] = jss::AccountSet; tx_json[jss::Account] = env.master.human(); 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/test/server/ServerStatus_test.cpp b/src/test/server/ServerStatus_test.cpp index 9f35a9162d..a2516126de 100644 --- a/src/test/server/ServerStatus_test.cpp +++ b/src/test/server/ServerStatus_test.cpp @@ -1149,7 +1149,7 @@ class ServerStatus_test : public beast::unit_test::suite, doHTTPRequest(env, yield, false, resp, ec, to_string(jv)); BEAST_EXPECT( resp.result() == boost::beast::http::status::bad_request); - BEAST_EXPECT(resp.body() == "params unparseable\r\n"); + BEAST_EXPECT(resp.body() == "params unparsable\r\n"); } { @@ -1159,7 +1159,7 @@ class ServerStatus_test : public beast::unit_test::suite, doHTTPRequest(env, yield, false, resp, ec, to_string(jv)); BEAST_EXPECT( resp.result() == boost::beast::http::status::bad_request); - BEAST_EXPECT(resp.body() == "params unparseable\r\n"); + BEAST_EXPECT(resp.body() == "params unparsable\r\n"); } } 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/ledger/detail/LedgerMaster.cpp b/src/xrpld/app/ledger/detail/LedgerMaster.cpp index 2a2424995e..d176e85645 100644 --- a/src/xrpld/app/ledger/detail/LedgerMaster.cpp +++ b/src/xrpld/app/ledger/detail/LedgerMaster.cpp @@ -2204,7 +2204,7 @@ LedgerMaster::makeFetchPack( catch (std::exception const& ex) { JLOG(m_journal.warn()) - << "Exception building fetch pach. Exception: " << ex.what(); + << "Exception building fetch pack. Exception: " << ex.what(); } } 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/FeeVoteImpl.cpp b/src/xrpld/app/misc/FeeVoteImpl.cpp index a6b140f691..08a9abf2db 100644 --- a/src/xrpld/app/misc/FeeVoteImpl.cpp +++ b/src/xrpld/app/misc/FeeVoteImpl.cpp @@ -230,12 +230,11 @@ FeeVoteImpl::doVoting( auto const& valueField) { if (auto const field = val->at(~valueField)) { - using xrptype = XRPAmount::value_type; + using XRPType = XRPAmount::value_type; auto const vote = *field; - if (vote <= std::numeric_limits::max() && - isLegalAmountSigned(XRPAmount{unsafe_cast(vote)})) - value.addVote( - XRPAmount{unsafe_cast(vote)}); + if (vote <= std::numeric_limits::max() && + isLegalAmountSigned(XRPAmount{unsafe_cast(vote)})) + value.addVote(XRPAmount{unsafe_cast(vote)}); else // Invalid amounts will be treated as if they're // not provided. Don't throw because this value is 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..6a00354b15 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 + @@ -3461,10 +3461,10 @@ NetworkOPsImp::pubAccountTransaction( } } - if (auto histoIt = mSubAccountHistory.find(affectedAccount); - histoIt != mSubAccountHistory.end()) + if (auto historyIt = mSubAccountHistory.find(affectedAccount); + historyIt != mSubAccountHistory.end()) { - auto& subs = histoIt->second; + auto& subs = historyIt->second; auto it = subs.begin(); while (it != subs.end()) { @@ -3487,7 +3487,7 @@ NetworkOPsImp::pubAccountTransaction( } } if (subs.empty()) - mSubAccountHistory.erase(histoIt); + mSubAccountHistory.erase(historyIt); } } } @@ -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/SHAMapStoreImp.h b/src/xrpld/app/misc/SHAMapStoreImp.h index aed2343a49..38997c2997 100644 --- a/src/xrpld/app/misc/SHAMapStoreImp.h +++ b/src/xrpld/app/misc/SHAMapStoreImp.h @@ -54,7 +54,7 @@ private: // name of state database std::string const dbName_ = "state"; // prefix of on-disk nodestore backend instances - std::string const dbPrefix_ = "rippledb"; + 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/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..10ed4adeea 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; @@ -537,12 +537,12 @@ private: /** Cached result of the `preflight` operation. Because `preflight` is expensive, minimize the number of times it needs to be done. - @invariant `pfresult` is never allowed to be empty. The + @invariant `pfResult` is never allowed to be empty. The `std::optional` is leveraged to allow `emplace`d construction and replacement without a copy assignment operation. */ - std::optional pfresult; + std::optional pfResult; /** Starting retry count for newly queued transactions. @@ -577,7 +577,7 @@ private: TxID const& txID, FeeLevel64 feeLevel, ApplyFlags const flags, - PreflightResult const& pfresult); + PreflightResult const& pfResult); /// Attempt to apply the queued transaction to the open ledger. ApplyResult @@ -588,7 +588,7 @@ private: TxConsequences const& consequences() const { - return pfresult->consequences; + return pfResult->consequences; } /// Return a TxDetails based on contained information. @@ -603,7 +603,7 @@ private: seqProxy, txn, retriesRemaining, - pfresult->ter, + pfResult->ter, lastResult}; } }; @@ -802,7 +802,7 @@ private: FeeMultiSet::iterator_type erase(FeeMultiSet::const_iterator_type); /** Erase and return the next entry for the account (if fee level is higher), or next entry in byFee_ (lower fee level). - Used to get the next "applyable" MaybeTx for accept(). + Used to get the next "applicable" MaybeTx for accept(). */ FeeMultiSet::iterator_type eraseAndAdvance( FeeMultiSet::const_iterator_type); @@ -826,7 +826,7 @@ private: AccountMap::iterator const& accountIter, TxQAccount::TxMap::iterator, FeeLevel64 feeLevelPaid, - PreflightResult const& pfresult, + PreflightResult const& pfResult, std::size_t const txExtraCount, ApplyFlags flags, FeeMetrics::Snapshot const& metricsSnapshot, diff --git a/src/xrpld/app/misc/ValidatorList.h b/src/xrpld/app/misc/ValidatorList.h index d6758f8877..45b24e8609 100644 --- a/src/xrpld/app/misc/ValidatorList.h +++ b/src/xrpld/app/misc/ValidatorList.h @@ -237,7 +237,7 @@ class ValidatorList // config file under the title of SECTION_VALIDATORS or [validators]. // This list is not associated with the masterKey of any publisher. - // Appropos PublisherListCollection fields, localPublisherList does not + // Apropos PublisherListCollection fields, localPublisherList does not // have any "remaining" manifests. It is assumed to be perennially // "available". The "validUntil" field is set to the highest possible // value of the field, hence this list is always valid. @@ -365,7 +365,7 @@ public: std::string const& rawManifest, std::map const& blobInfos, std::vector& messages, - std::size_t maxSize = maximiumMessageSize); + std::size_t maxSize = maximumMessageSize); /** Apply multiple published lists of public keys, then broadcast it to all peers that have not seen it or sent it. 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); - // EgetSeqProxy()) , retriesRemaining(retriesAllowed) , flags(flags_) - , pfresult(pfresult_) + , pfResult(pfResult_) { } @@ -281,20 +281,20 @@ TxQ::MaybeTx::apply(Application& app, OpenView& view, beast::Journal j) { // If the rules or flags change, preflight again XRPL_ASSERT( - pfresult, "xrpl::TxQ::MaybeTx::apply : preflight result is set"); + pfResult, "xrpl::TxQ::MaybeTx::apply : preflight result is set"); NumberSO stNumberSO{view.rules().enabled(fixUniversalNumber)}; - if (pfresult->rules != view.rules() || pfresult->flags != flags) + if (pfResult->rules != view.rules() || pfResult->flags != flags) { JLOG(j.debug()) << "Queued transaction " << txID << " rules or flags have changed. Flags from " - << pfresult->flags << " to " << flags; + << pfResult->flags << " to " << flags; - pfresult.emplace( - preflight(app, view.rules(), pfresult->tx, flags, pfresult->j)); + pfResult.emplace( + preflight(app, view.rules(), pfResult->tx, flags, pfResult->j)); } - auto pcresult = preclaim(*pfresult, app, view); + auto pcresult = preclaim(*pfResult, app, view); return doApply(pcresult, app, view); } @@ -503,7 +503,7 @@ TxQ::tryClearAccountQueueUpThruTx( TxQ::AccountMap::iterator const& accountIter, TxQAccount::TxMap::iterator beginTxIter, FeeLevel64 feeLevelPaid, - PreflightResult const& pfresult, + PreflightResult const& pfResult, std::size_t const txExtraCount, ApplyFlags flags, FeeMetrics::Snapshot const& metricsSnapshot, @@ -578,7 +578,7 @@ TxQ::tryClearAccountQueueUpThruTx( } // Apply the current tx. Because the state of the view has been changed // by the queued txs, we also need to preclaim again. - auto const txResult = doApply(preclaim(pfresult, app, view), app, view); + auto const txResult = doApply(preclaim(pfResult, app, view), app, view); if (txResult.applied) { @@ -720,9 +720,9 @@ TxQ::apply( // See if the transaction is valid, properly formed, // etc. before doing potentially expensive queue // replace and multi-transaction operations. - auto const pfresult = preflight(app, view.rules(), *tx, flags, j); - if (pfresult.ter != tesSUCCESS) - return {pfresult.ter, false}; + auto const pfResult = preflight(app, view.rules(), *tx, flags, j); + if (pfResult.ter != tesSUCCESS) + return {pfResult.ter, false}; // See if the transaction paid a high enough fee that it can go straight // into the ledger. @@ -814,7 +814,7 @@ TxQ::apply( // 1. If the account's queue is empty or // 2. If the blocker replaces the only entry in the account's queue. auto const transactionID = tx->getTransactionID(); - if (pfresult.consequences.isBlocker()) + if (pfResult.consequences.isBlocker()) { if (acctTxCount > 1) { @@ -1040,8 +1040,8 @@ TxQ::apply( // The fee for the candidate transaction _should_ be // counted if it's replacing a transaction in the middle // of the queue. - totalFee += pfresult.consequences.fee(); - potentialSpend += pfresult.consequences.potentialSpend(); + totalFee += pfResult.consequences.fee(); + potentialSpend += pfResult.consequences.potentialSpend(); } } @@ -1144,7 +1144,7 @@ TxQ::apply( // is valid. So we use a special entry point that runs all of the // preclaim checks with the exception of the sequence check. auto const pcresult = - preclaim(pfresult, app, multiTxn ? multiTxn->openView : view); + preclaim(pfResult, app, multiTxn ? multiTxn->openView : view); if (!pcresult.likelyToClaimFee) return {pcresult.ter, false}; @@ -1187,7 +1187,7 @@ TxQ::apply( accountIter, txIter->first, feeLevelPaid, - pfresult, + pfResult, view.txCount(), flags, metricsSnapshot, @@ -1316,12 +1316,12 @@ TxQ::apply( flags &= ~tapRETRY; auto& candidate = accountIter->second.add( - {tx, transactionID, feeLevelPaid, flags, pfresult}); + {tx, transactionID, feeLevelPaid, flags, pfResult}); // Then index it into the byFee lookup. byFee_.insert(candidate); JLOG(j_.debug()) << "Added transaction " << candidate.txID - << " with result " << transToken(pfresult.ter) << " from " + << " with result " << transToken(pfResult.ter) << " from " << (accountIsInQueue ? "existing" : "new") << " account " << candidate.account << " to queue." << " Flags: " << flags; diff --git a/src/xrpld/app/misc/detail/ValidatorList.cpp b/src/xrpld/app/misc/detail/ValidatorList.cpp index db2ee980b8..12ba52fa36 100644 --- a/src/xrpld/app/misc/detail/ValidatorList.cpp +++ b/src/xrpld/app/misc/detail/ValidatorList.cpp @@ -524,7 +524,7 @@ splitMessageParts( smallMsg.set_manifest(blob.manifest()); XRPL_ASSERT( - Message::totalSize(smallMsg) <= maximiumMessageSize, + Message::totalSize(smallMsg) <= maximumMessageSize, "xrpl::splitMessageParts : maximum message size"); messages.emplace_back( @@ -588,7 +588,7 @@ buildValidatorListMessage( msg.set_version(version); XRPL_ASSERT( - Message::totalSize(msg) <= maximiumMessageSize, + Message::totalSize(msg) <= maximumMessageSize, "xrpl::buildValidatorListMessage(ValidatorBlobInfo) : maximum " "message size"); messages.emplace_back( @@ -658,7 +658,7 @@ ValidatorList::buildValidatorListMessages( std::string const& rawManifest, std::map const& blobInfos, std::vector& messages, - std::size_t maxSize /*= maximiumMessageSize*/) + std::size_t maxSize /*= maximumMessageSize*/) { XRPL_ASSERT( !blobInfos.empty(), diff --git a/src/xrpld/app/paths/AMMOffer.h b/src/xrpld/app/paths/AMMOffer.h index 07defc16b1..7a81e53176 100644 --- a/src/xrpld/app/paths/AMMOffer.h +++ b/src/xrpld/app/paths/AMMOffer.h @@ -82,7 +82,7 @@ public: */ TAmounts limitOut( - TAmounts const& offrAmt, + TAmounts const& offerAmount, TOut const& limit, bool roundUp) const; @@ -91,8 +91,10 @@ public: * current quality. */ TAmounts - limitIn(TAmounts const& offrAmt, TIn const& limit, bool roundUp) - const; + limitIn( + TAmounts const& offerAmount, + TIn const& limit, + bool roundUp) const; QualityFunction getQualityFunc() const; diff --git a/src/xrpld/app/paths/PathRequest.h b/src/xrpld/app/paths/PathRequest.h index 3d5564c069..8f63cfa9a9 100644 --- a/src/xrpld/app/paths/PathRequest.h +++ b/src/xrpld/app/paths/PathRequest.h @@ -103,7 +103,7 @@ private: std::function const&); /** Finds and sets a PathSet in the JSON argument. - Returns false if the source currencies are inavlid. + Returns false if the source currencies are invalid. */ bool findPaths( diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index 1d3be85d48..c99467dade 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -40,7 +40,7 @@ final paths and the estimated cost are returned. The engine permits the search depth to be selected and the paths table includes the depth at which each path type is found. A search depth of zero causes no searching to be done. Extra paths can also be injected, and this -should be used to preserve previously-found paths across invokations for the +should be used to preserve previously-found paths across invocations for the same path request (particularly if the search depth may change). */ @@ -1292,7 +1292,7 @@ fillPaths(Pathfinder::PaymentType type, PathCostList const& costs) // 1 = include trivial paths to make common cases work // 4 = normal fast search level // 7 = normal slow search level -// 10 = most agressive +// 10 = most aggressive void Pathfinder::initPathTable() @@ -1301,6 +1301,7 @@ Pathfinder::initPathTable() mPathTable.clear(); fillPaths(pt_XRP_to_XRP, {}); + /* cspell: disable */ fillPaths( pt_XRP_to_nonXRP, @@ -1357,6 +1358,7 @@ Pathfinder::initPathTable() {8, "saafad"}, {9, "safaad"}, }); + /* cspell: enable */ } } // namespace xrpl diff --git a/src/xrpld/app/paths/detail/AMMOffer.cpp b/src/xrpld/app/paths/detail/AMMOffer.cpp index a58eafbdbf..1152b673da 100644 --- a/src/xrpld/app/paths/detail/AMMOffer.cpp +++ b/src/xrpld/app/paths/detail/AMMOffer.cpp @@ -61,7 +61,7 @@ AMMOffer::consume( template TAmounts AMMOffer::limitOut( - TAmounts const& offrAmt, + TAmounts const& offerAmount, TOut const& limit, bool roundUp) const { @@ -75,7 +75,7 @@ AMMOffer::limitOut( { // It turns out that the ceil_out implementation has some slop in // it, which ceil_out_strict removes. - return quality().ceil_out_strict(offrAmt, limit, roundUp); + return quality().ceil_out_strict(offerAmount, limit, roundUp); } // Change the offer size according to the conservation function. The offer // quality is increased in this case, but it doesn't matter since there is @@ -86,7 +86,7 @@ AMMOffer::limitOut( template TAmounts AMMOffer::limitIn( - TAmounts const& offrAmt, + TAmounts const& offerAmount, TIn const& limit, bool roundUp) const { @@ -95,9 +95,9 @@ AMMOffer::limitIn( { if (auto const& rules = getCurrentTransactionRules(); rules && rules->enabled(fixReducedOffersV2)) - return quality().ceil_in_strict(offrAmt, limit, roundUp); + return quality().ceil_in_strict(offerAmount, limit, roundUp); - return quality().ceil_in(offrAmt, limit); + return quality().ceil_in(offerAmount, limit); } return {limit, swapAssetIn(balances_, limit, ammLiquidity_.tradingFee())}; } diff --git a/src/xrpld/app/paths/detail/DirectStep.cpp b/src/xrpld/app/paths/detail/DirectStep.cpp index 5f9d0c86e7..4e701d348f 100644 --- a/src/xrpld/app/paths/detail/DirectStep.cpp +++ b/src/xrpld/app/paths/detail/DirectStep.cpp @@ -268,7 +268,7 @@ public: // During offer crossing we rely on the fact that prevStepRedeems // will *always* issue. That's because: // o If there's a prevStep_, it will always be a BookStep. - // o BookStep::debtDirection() aways returns `issues` when offer + // o BookStep::debtDirection() always returns `issues` when offer // crossing. // An assert based on this return value will tell us if that // behavior changes. diff --git a/src/xrpld/app/paths/detail/StrandFlow.h b/src/xrpld/app/paths/detail/StrandFlow.h index 5e0a637858..fab92dca35 100644 --- a/src/xrpld/app/paths/detail/StrandFlow.h +++ b/src/xrpld/app/paths/detail/StrandFlow.h @@ -435,8 +435,8 @@ public: cur_.clear(); if (!next_.empty()) { - std::vector> strandQuals; - strandQuals.reserve(next_.size()); + std::vector> strandQualities; + strandQualities.reserve(next_.size()); if (next_.size() > 1) // no need to sort one strand { for (Strand const* strand : next_) @@ -458,21 +458,21 @@ public: // an unusual corner case. continue; } - strandQuals.push_back({*qual, strand}); + strandQualities.push_back({*qual, strand}); } } // must stable sort for deterministic order across different c++ // standard library implementations std::stable_sort( - strandQuals.begin(), - strandQuals.end(), + strandQualities.begin(), + strandQualities.end(), [](auto const& lhs, auto const& rhs) { // higher qualities first return std::get(lhs) > std::get(rhs); }); next_.clear(); - next_.reserve(strandQuals.size()); - for (auto const& sq : strandQuals) + next_.reserve(strandQualities.size()); + for (auto const& sq : strandQualities) { next_.push_back(std::get(sq)); } diff --git a/src/xrpld/app/rdb/backend/detail/Node.h b/src/xrpld/app/rdb/backend/detail/Node.h index 37d028c035..8f30775c69 100644 --- a/src/xrpld/app/rdb/backend/detail/Node.h +++ b/src/xrpld/app/rdb/backend/detail/Node.h @@ -26,7 +26,7 @@ struct DatabasePairValid * @param checkpointerSetup Database checkpointer setup. * @param j Journal. * @return Struct DatabasePairValid which contain unique pointers to ledger - * and transaction databases and flag if opening was successfull. + * and transaction databases and flag if opening was successful. */ DatabasePairValid makeLedgerDBs( @@ -106,7 +106,7 @@ getRowsMinMax(soci::session& session, TableType type); * @param app Application object. * @param ledger The ledger. * @param current True if ledger is current. - * @return True is saving was successfull. + * @return True is saving was successful. */ bool saveValidatedLedger( @@ -140,7 +140,7 @@ getNewestLedgerInfo(soci::session& session, beast::Journal j); /** * @brief getLimitedOldestLedgerInfo Returns info of oldest ledger - * from ledgers with sequences greather or equal to given. + * from ledgers with sequences greater or equal to given. * @param session Session with database. * @param ledgerFirstIndex Minimum ledger sequence. * @param j Journal. @@ -154,7 +154,7 @@ getLimitedOldestLedgerInfo( /** * @brief getLimitedNewestLedgerInfo Returns info of newest ledger - * from ledgers with sequences greather or equal to given. + * from ledgers with sequences greater or equal to given. * @param session Session with database. * @param ledgerFirstIndex Minimum ledger sequence. * @param j Journal. @@ -205,8 +205,8 @@ getHashesByIndex( /** * @brief getHashesByIndex Returns hash of the ledger and hash of parent - * ledger for all ledgers with seqyences from given minimum limit - * to fiven maximum limit. + * ledger for all ledgers with sequences from given minimum limit + * to given maximum limit. * @param session Session with database. * @param minSeq Minimum ledger sequence. * @param maxSeq Maximum ledger sequence. @@ -414,7 +414,7 @@ newestAccountTxPage( * given and all ledgers from range are present in the database, * TxSearched::some if range given and not all ledgers are present, * TxSearched::unknown if range not given or deserializing error - * occured. In the last case error code modified in ec link + * occurred. In the last case error code modified in ec link * parameter, in other cases default error code remained. */ std::variant diff --git a/src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp b/src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp index 796b030a99..77757419dc 100644 --- a/src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp +++ b/src/xrpld/app/rdb/backend/detail/SQLiteDatabase.cpp @@ -155,7 +155,7 @@ private: Application& app_; bool const useTxTables_; beast::Journal j_; - std::unique_ptr lgrdb_, txdb_; + std::unique_ptr ledgerDb_, txdb_; /** * @brief makeLedgerDBs Opens ledger and transaction databases for the node @@ -178,7 +178,7 @@ private: bool existsLedger() { - return static_cast(lgrdb_); + return static_cast(ledgerDb_); } /** @@ -200,7 +200,7 @@ private: auto checkoutLedger() { - return lgrdb_->checkoutDb(); + return ledgerDb_->checkoutDb(); } /** @@ -224,7 +224,7 @@ SQLiteDatabaseImp::makeLedgerDBs( auto [lgr, tx, res] = detail::makeLedgerDBs(config, setup, checkpointerSetup, j_); txdb_ = std::move(tx); - lgrdb_ = std::move(lgr); + ledgerDb_ = std::move(lgr); return res; } @@ -392,7 +392,8 @@ SQLiteDatabaseImp::saveValidatedLedger( { if (existsLedger()) { - if (!detail::saveValidatedLedger(*lgrdb_, txdb_, app_, ledger, current)) + if (!detail::saveValidatedLedger( + *ledgerDb_, txdb_, app_, ledger, current)) return false; } @@ -789,7 +790,7 @@ SQLiteDatabaseImp::getKBUsedAll() { if (existsLedger()) { - return xrpl::getKBUsedAll(lgrdb_->getSession()); + return xrpl::getKBUsedAll(ledgerDb_->getSession()); } return 0; @@ -800,7 +801,7 @@ SQLiteDatabaseImp::getKBUsedLedger() { if (existsLedger()) { - return xrpl::getKBUsedDB(lgrdb_->getSession()); + return xrpl::getKBUsedDB(ledgerDb_->getSession()); } return 0; @@ -823,7 +824,7 @@ SQLiteDatabaseImp::getKBUsedTransaction() void SQLiteDatabaseImp::closeLedgerDB() { - lgrdb_.reset(); + ledgerDb_.reset(); } void diff --git a/src/xrpld/app/tx/applySteps.h b/src/xrpld/app/tx/applySteps.h index c0c530f3ac..0ae3d8790e 100644 --- a/src/xrpld/app/tx/applySteps.h +++ b/src/xrpld/app/tx/applySteps.h @@ -64,7 +64,7 @@ private: public: // Constructor if preflight returns a value other than tesSUCCESS. // Asserts if tesSUCCESS is passed. - explicit TxConsequences(NotTEC pfresult); + explicit TxConsequences(NotTEC pfResult); /// Constructor if the STTx has no notable consequences for the TxQ. explicit TxConsequences(STTx const& tx); 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/DelegateSet.cpp b/src/xrpld/app/tx/detail/DelegateSet.cpp index 8c64547ae1..96d02bf2bc 100644 --- a/src/xrpld/app/tx/detail/DelegateSet.cpp +++ b/src/xrpld/app/tx/detail/DelegateSet.cpp @@ -26,7 +26,7 @@ DelegateSet::preflight(PreflightContext const& ctx) if (!permissionSet.insert(permission[sfPermissionValue]).second) return temMALFORMED; - if (!Permission::getInstance().isDelegatable( + if (!Permission::getInstance().isDelegable( permission[sfPermissionValue], ctx.rules)) return temMALFORMED; } diff --git a/src/xrpld/app/tx/detail/InvariantCheck.cpp b/src/xrpld/app/tx/detail/InvariantCheck.cpp index dadc5a7d74..eb751c817f 100644 --- a/src/xrpld/app/tx/detail/InvariantCheck.cpp +++ b/src/xrpld/app/tx/detail/InvariantCheck.cpp @@ -567,7 +567,7 @@ AccountRootsDeletedClean::finalize( } { - // NFT pages. ntfpage_min and nftpage_max were already explicitly + // NFT pages. nftpage_min and nftpage_max were already explicitly // checked above as entries in directAccountKeylets. This uses // view.succ() to check for any NFT pages in between the two // endpoints. @@ -2321,7 +2321,7 @@ NoModifiedUnmodifiableFields::finalize( if (bad) { JLOG(j.fatal()) - << "Invariant failed: changed an unchangable field for " + << "Invariant failed: changed an unchangeable field for " << tx.getTransactionID(); if (enforce) return false; 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/Offer.h b/src/xrpld/app/tx/detail/Offer.h index b04049b657..75e78e5758 100644 --- a/src/xrpld/app/tx/detail/Offer.h +++ b/src/xrpld/app/tx/detail/Offer.h @@ -121,13 +121,15 @@ public: TAmounts limitOut( - TAmounts const& offrAmt, + TAmounts const& offerAmount, TOut const& limit, bool roundUp) const; TAmounts - limitIn(TAmounts const& offrAmt, TIn const& limit, bool roundUp) - const; + limitIn( + TAmounts const& offerAmount, + TIn const& limit, + bool roundUp) const; template static TER @@ -218,19 +220,19 @@ TOffer::setFieldAmounts() template TAmounts TOffer::limitOut( - TAmounts const& offrAmt, + TAmounts const& offerAmount, TOut const& limit, bool roundUp) const { // It turns out that the ceil_out implementation has some slop in // it, which ceil_out_strict removes. - return quality().ceil_out_strict(offrAmt, limit, roundUp); + return quality().ceil_out_strict(offerAmount, limit, roundUp); } template TAmounts TOffer::limitIn( - TAmounts const& offrAmt, + TAmounts const& offerAmount, TIn const& limit, bool roundUp) const { @@ -240,8 +242,8 @@ TOffer::limitIn( // it. ceil_in_strict removes that slop. But removing that slop // affects transaction outcomes, so the change must be made using // an amendment. - return quality().ceil_in_strict(offrAmt, limit, roundUp); - return m_quality.ceil_in(offrAmt, limit); + return quality().ceil_in_strict(offerAmount, limit, roundUp); + return m_quality.ceil_in(offerAmount, limit); } template diff --git a/src/xrpld/app/tx/detail/OfferStream.cpp b/src/xrpld/app/tx/detail/OfferStream.cpp index 49e45976eb..587badf31a 100644 --- a/src/xrpld/app/tx/detail/OfferStream.cpp +++ b/src/xrpld/app/tx/detail/OfferStream.cpp @@ -341,7 +341,7 @@ TOfferStreamBase::step() } // LCOV_EXCL_START UNREACHABLE( - "rippls::TOfferStreamBase::step::rmSmallIncreasedQOffer : XRP " + "xrpl::TOfferStreamBase::step::rmSmallIncreasedQOffer : XRP " "vs XRP offer"); return false; // LCOV_EXCL_STOP 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/app/tx/detail/Transactor.cpp b/src/xrpld/app/tx/detail/Transactor.cpp index 7b0cbbbdd4..851712fe90 100644 --- a/src/xrpld/app/tx/detail/Transactor.cpp +++ b/src/xrpld/app/tx/detail/Transactor.cpp @@ -1133,7 +1133,7 @@ Transactor::operator()() // raii classes for the current ledger rules. // fixUniversalNumber predate the rulesGuard and should be replaced. NumberSO stNumberSO{view().rules().enabled(fixUniversalNumber)}; - CurrentTransactionRulesGuard currentTransctionRulesGuard(view().rules()); + CurrentTransactionRulesGuard currentTransactionRulesGuard(view().rules()); #ifdef DEBUG { diff --git a/src/xrpld/app/tx/detail/XChainBridge.cpp b/src/xrpld/app/tx/detail/XChainBridge.cpp index 88cc236e0b..ebfcc8a769 100644 --- a/src/xrpld/app/tx/detail/XChainBridge.cpp +++ b/src/xrpld/app/tx/detail/XChainBridge.cpp @@ -324,7 +324,7 @@ onNewAttestations( return {std::move(r.value()), changed}; }; -// Check if there is a quorurm of attestations for the given amount and +// Check if there is a quorum of attestations for the given amount and // chain. If so return the reward accounts, if not return the tec code (most // likely tecXCHAIN_CLAIM_NO_QUORUM) Expected, TER> @@ -434,7 +434,7 @@ transferHelper( auto const availableBalance = [&]() -> STAmount { STAmount const curBal = (*sleSrc)[sfBalance]; // Checking that account == src and postFeeBalance == curBal is - // not strictly nessisary, but helps protect against future + // not strictly necessary, but helps protect against future // changes if (!submittingAccountInfo || submittingAccountInfo->account != src || @@ -622,7 +622,7 @@ finalizeClaimHelper( // If distributing the reward pool fails, the mainFunds transfer should // be rolled back // - // If the claimid is removed, the rewards should be distributed + // If the claim ID is removed, the rewards should be distributed // even if the mainFunds fails. // // If OnTransferFail::removeClaim, the claim should be removed even if @@ -1190,7 +1190,7 @@ toClaim(STTx const& tx) template NotTEC -attestationpreflight(PreflightContext const& ctx) +attestationPreflight(PreflightContext const& ctx) { if (!publicKeyType(ctx.tx[sfPublicKey])) return temMALFORMED; @@ -2076,7 +2076,7 @@ XChainCreateClaimID::doApply() NotTEC XChainAddClaimAttestation::preflight(PreflightContext const& ctx) { - return attestationpreflight(ctx); + return attestationPreflight(ctx); } TER @@ -2096,7 +2096,7 @@ XChainAddClaimAttestation::doApply() NotTEC XChainAddAccountCreateAttestation::preflight(PreflightContext const& ctx) { - return attestationpreflight(ctx); + return attestationPreflight(ctx); } TER diff --git a/src/xrpld/app/tx/detail/applySteps.cpp b/src/xrpld/app/tx/detail/applySteps.cpp index 7f0d971fdc..e0bd9d0d2d 100644 --- a/src/xrpld/app/tx/detail/applySteps.cpp +++ b/src/xrpld/app/tx/detail/applySteps.cpp @@ -217,7 +217,7 @@ invoke_calculateBaseFee(ReadView const& view, STTx const& tx) } } -TxConsequences::TxConsequences(NotTEC pfresult) +TxConsequences::TxConsequences(NotTEC pfResult) : isBlocker_(false) , fee_(beast::zero) , potentialSpend_(beast::zero) @@ -225,7 +225,7 @@ TxConsequences::TxConsequences(NotTEC pfresult) , sequencesConsumed_(0) { XRPL_ASSERT( - !isTesSuccess(pfresult), + !isTesSuccess(pfResult), "xrpl::TxConsequences::TxConsequences : is not tesSUCCESS"); } @@ -288,15 +288,15 @@ preflight( ApplyFlags flags, beast::Journal j) { - PreflightContext const pfctx(app, tx, rules, flags, j); + PreflightContext const pfCtx(app, tx, rules, flags, j); try { - return {pfctx, invoke_preflight(pfctx)}; + return {pfCtx, invoke_preflight(pfCtx)}; } catch (std::exception const& e) { JLOG(j.fatal()) << "apply (preflight): " << e.what(); - return {pfctx, {tefEXCEPTION, TxConsequences{tx}}}; + return {pfCtx, {tefEXCEPTION, TxConsequences{tx}}}; } } @@ -309,15 +309,15 @@ preflight( ApplyFlags flags, beast::Journal j) { - PreflightContext const pfctx(app, tx, parentBatchId, rules, flags, j); + PreflightContext const pfCtx(app, tx, parentBatchId, rules, flags, j); try { - return {pfctx, invoke_preflight(pfctx)}; + return {pfCtx, invoke_preflight(pfCtx)}; } catch (std::exception const& e) { JLOG(j.fatal()) << "apply (preflight): " << e.what(); - return {pfctx, {tefEXCEPTION, TxConsequences{tx}}}; + return {pfCtx, {tefEXCEPTION, TxConsequences{tx}}}; } } 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/consensus/DisputedTx.h b/src/xrpld/consensus/DisputedTx.h index f4b841c795..5207f9750e 100644 --- a/src/xrpld/consensus/DisputedTx.h +++ b/src/xrpld/consensus/DisputedTx.h @@ -332,10 +332,10 @@ DisputedTx::getJson() const if (!votes_.empty()) { - Json::Value votesj(Json::objectValue); + Json::Value votes(Json::objectValue); for (auto const& [nodeId, vote] : votes_) - votesj[to_string(nodeId)] = vote; - ret["votes"] = std::move(votesj); + votes[to_string(nodeId)] = vote; + ret["votes"] = std::move(votes); } return ret; diff --git a/src/xrpld/consensus/Validations.h b/src/xrpld/consensus/Validations.h index 15b33c89c4..339612cfe0 100644 --- a/src/xrpld/consensus/Validations.h +++ b/src/xrpld/consensus/Validations.h @@ -455,9 +455,9 @@ private: are checked and any stale validations are flushed from the trie. @param lock Existing lock of mutex_ - @param f Invokable with signature (LedgerTrie &) + @param f Invocable with signature (LedgerTrie &) - @warning The invokable `f` is expected to be a simple transformation of + @warning The invocable `f` is expected to be a simple transformation of its arguments and will be called with mutex_ under lock. */ @@ -476,14 +476,14 @@ private: Iterate current validations, flushing any which are stale. @param lock Existing lock of mutex_ - @param pre Invokable with signature (std::size_t) called prior to + @param pre Invocable with signature (std::size_t) called prior to looping. - @param f Invokable with signature (NodeID const &, Validations const &) + @param f Invocable with signature (NodeID const &, Validations const &) for each current validation. - @note The invokable `pre` is called _prior_ to checking for staleness + @note The invocable `pre` is called _prior_ to checking for staleness and reflects an upper-bound on the number of calls to `f. - @warning The invokable `f` is expected to be a simple transformation of + @warning The invocable `f` is expected to be a simple transformation of its arguments and will be called with mutex_ under lock. */ @@ -517,12 +517,12 @@ private: @param lock Existing lock on mutex_ @param ledgerID The identifier of the ledger - @param pre Invokable with signature(std::size_t) - @param f Invokable with signature (NodeID const &, Validation const &) + @param pre Invocable with signature(std::size_t) + @param f Invocable with signature (NodeID const &, Validation const &) - @note The invokable `pre` is called prior to iterating validations. The + @note The invocable `pre` is called prior to iterating validations. The argument is the number of times `f` will be called. - @warning The invokable f is expected to be a simple transformation of + @warning The invocable f is expected to be a simple transformation of its arguments and will be called with mutex_ under lock. */ template 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/Message.h b/src/xrpld/overlay/Message.h index f2b021840d..550c24eef3 100644 --- a/src/xrpld/overlay/Message.h +++ b/src/xrpld/overlay/Message.h @@ -12,7 +12,7 @@ namespace xrpl { -constexpr std::size_t maximiumMessageSize = megabytes(64); +constexpr std::size_t maximumMessageSize = megabytes(64); // VFALCO NOTE If we forward declare Message and write out shared_ptr // instead of using the in-class type alias, we can remove the diff --git a/src/xrpld/overlay/Overlay.h b/src/xrpld/overlay/Overlay.h index c30d0f5205..aaecd50eb6 100644 --- a/src/xrpld/overlay/Overlay.h +++ b/src/xrpld/overlay/Overlay.h @@ -94,7 +94,7 @@ public: size() const = 0; /** Return diagnostics on the status of all peers. - @deprecated This is superceded by PropertyStream + @deprecated This is superseded by PropertyStream */ virtual Json::Value json() = 0; diff --git a/src/xrpld/overlay/Slot.h b/src/xrpld/overlay/Slot.h index 9e717fef9c..66368b60b9 100644 --- a/src/xrpld/overlay/Slot.h +++ b/src/xrpld/overlay/Slot.h @@ -345,14 +345,14 @@ Slot::update( auto it = std::next(considered_.begin(), i); auto id = *it; considered_.erase(it); - auto const& itpeers = peers_.find(id); - if (itpeers == peers_.end()) + auto const& itPeers = peers_.find(id); + if (itPeers == peers_.end()) { JLOG(journal_.error()) << "update: peer not found " << Slice(validator) << " " << id; continue; } - if (now - itpeers->second.lastMessage < IDLED) + if (now - itPeers->second.lastMessage < IDLED) selected.insert(id); } diff --git a/src/xrpld/overlay/detail/OverlayImpl.cpp b/src/xrpld/overlay/detail/OverlayImpl.cpp index 7cd02c72e0..d1d2467b1e 100644 --- a/src/xrpld/overlay/detail/OverlayImpl.cpp +++ b/src/xrpld/overlay/detail/OverlayImpl.cpp @@ -620,7 +620,7 @@ OverlayImpl::onManifests( std::shared_ptr const& from) { auto const n = m->list_size(); - auto const& journal = from->pjournal(); + auto const& journal = from->pJournal(); protocol::TMManifests relay; diff --git a/src/xrpld/overlay/detail/OverlayImpl.h b/src/xrpld/overlay/detail/OverlayImpl.h index dc7e4975a3..786f42184e 100644 --- a/src/xrpld/overlay/detail/OverlayImpl.h +++ b/src/xrpld/overlay/detail/OverlayImpl.h @@ -461,7 +461,7 @@ private: /** Handles validator list requests. Using a /vl/ URL, will retrieve the - latest valdiator list (or UNL) that this node has for that + latest validator list (or UNL) that this node has for that public key, if the node trusts that public key. @return true if the request was handled. 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/overlay/detail/PeerImp.h b/src/xrpld/overlay/detail/PeerImp.h index 565c3f9d0f..1e28de0c31 100644 --- a/src/xrpld/overlay/detail/PeerImp.h +++ b/src/xrpld/overlay/detail/PeerImp.h @@ -323,7 +323,7 @@ public: virtual ~PeerImp(); beast::Journal const& - pjournal() const + pJournal() const { return p_journal_; } diff --git a/src/xrpld/overlay/detail/ProtocolMessage.h b/src/xrpld/overlay/detail/ProtocolMessage.h index 1a35deb6f0..51dfc1ac7c 100644 --- a/src/xrpld/overlay/detail/ProtocolMessage.h +++ b/src/xrpld/overlay/detail/ProtocolMessage.h @@ -114,7 +114,7 @@ struct MessageHeader std::uint16_t message_type = 0; /** Indicates which compression algorithm the payload is compressed with. - * Currenly only lz4 is supported. If None then the message is not + * Currently only lz4 is supported. If None then the message is not * compressed. */ compression::Algorithm algorithm = compression::Algorithm::None; @@ -340,8 +340,8 @@ invokeProtocolMessage( // whose size exceeds this may result in the connection being dropped. A // larger message size may be supported in the future or negotiated as // part of a protocol upgrade. - if (header->payload_wire_size > maximiumMessageSize || - header->uncompressed_size > maximiumMessageSize) + if (header->payload_wire_size > maximumMessageSize || + header->uncompressed_size > maximumMessageSize) { result.second = make_error_code(boost::system::errc::message_size); return result; diff --git a/src/xrpld/overlay/detail/ProtocolVersion.h b/src/xrpld/overlay/detail/ProtocolVersion.h index ff49c89f1a..9499cd1c1b 100644 --- a/src/xrpld/overlay/detail/ProtocolVersion.h +++ b/src/xrpld/overlay/detail/ProtocolVersion.h @@ -32,7 +32,7 @@ to_string(ProtocolVersion const& p); Given a comma-separated string, extract and return all those that look like valid protocol versions (i.e. XRPL/2.0 and later). Strings that are - not parseable as valid protocol strings are excluded from the result set. + not parsable as valid protocol strings are excluded from the result set. @return A list of all apparently valid protocol versions. diff --git a/src/xrpld/overlay/detail/TxMetrics.cpp b/src/xrpld/overlay/detail/TxMetrics.cpp index 10f14183a3..ba3e7e8ae0 100644 --- a/src/xrpld/overlay/detail/TxMetrics.cpp +++ b/src/xrpld/overlay/detail/TxMetrics.cpp @@ -83,11 +83,11 @@ SingleMetrics::addMetrics(std::uint32_t val) if (timeElapsedInSecs >= 1s) { auto const avg = accum / (perTimeUnit ? timeElapsedInSecs.count() : N); - rollingAvgAggreg.push_back(avg); + rollingAvgAggregate.push_back(avg); auto const total = std::accumulate( - rollingAvgAggreg.begin(), rollingAvgAggreg.end(), 0ull); - rollingAvg = total / rollingAvgAggreg.size(); + rollingAvgAggregate.begin(), rollingAvgAggregate.end(), 0ull); + rollingAvg = total / rollingAvgAggregate.size(); intervalStart = clock_type::now(); accum = 0; diff --git a/src/xrpld/overlay/detail/TxMetrics.h b/src/xrpld/overlay/detail/TxMetrics.h index 3c34aaf9f9..265c9251d7 100644 --- a/src/xrpld/overlay/detail/TxMetrics.h +++ b/src/xrpld/overlay/detail/TxMetrics.h @@ -34,7 +34,7 @@ struct SingleMetrics std::uint64_t rollingAvg{0}; std::uint32_t N{0}; bool perTimeUnit{true}; - boost::circular_buffer rollingAvgAggreg{30, 0ull}; + boost::circular_buffer rollingAvgAggregate{30, 0ull}; /** Add metrics value * @param val metrics value, either bytes or count */ 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/peerfinder/detail/Livecache.h b/src/xrpld/peerfinder/detail/Livecache.h index 0927593ed1..c04b46dc6d 100644 --- a/src/xrpld/peerfinder/detail/Livecache.h +++ b/src/xrpld/peerfinder/detail/Livecache.h @@ -165,14 +165,14 @@ protected: /** The Livecache holds the short-lived relayed Endpoint messages. Since peers only advertise themselves when they have open slots, - we want these messags to expire rather quickly after the peer becomes + we want these messages to expire rather quickly after the peer becomes full. Addresses added to the cache are not connection-tested to see if - they are connectible (with one small exception regarding neighbors). + they are connectable (with one small exception regarding neighbors). Therefore, these addresses are not suitable for persisting across launches or for bootstrapping, because they do not have verifiable - and locally observed uptime and connectibility information. + and locally observed uptime and connectability information. */ template > class Livecache : protected detail::LivecacheBase diff --git a/src/xrpld/peerfinder/detail/Logic.h b/src/xrpld/peerfinder/detail/Logic.h index 50026cc886..aa56c8098c 100644 --- a/src/xrpld/peerfinder/detail/Logic.h +++ b/src/xrpld/peerfinder/detail/Logic.h @@ -628,7 +628,7 @@ public: This is a temporary measure. Once we know our own IP address, the correct solution is to put it into the Livecache at hops 0, and go through the regular handout path. This way - we avoid handing our address out too frequenty, which this code + we avoid handing our address out too frequently, which this code suffers from. */ // Add an entry for ourselves if: @@ -903,7 +903,7 @@ public: // Address must exist if (iter == connectedAddresses_.end()) LogicError( - "PeerFinder::Logic::remove(): remote_endpont " + "PeerFinder::Logic::remove(): remote_endpoint " "address missing from connectedAddresses_"); connectedAddresses_.erase(iter); @@ -929,7 +929,7 @@ public: auto iter(fixed_.find(slot->remote_endpoint())); if (iter == fixed_.end()) LogicError( - "PeerFinder::Logic::on_closed(): remote_endpont " + "PeerFinder::Logic::on_closed(): remote_endpoint " "missing from fixed_"); iter->second.failure(m_clock.now()); diff --git a/src/xrpld/peerfinder/detail/iosformat.h b/src/xrpld/peerfinder/detail/iosformat.h index 323665c016..a1117f0935 100644 --- a/src/xrpld/peerfinder/detail/iosformat.h +++ b/src/xrpld/peerfinder/detail/iosformat.h @@ -60,7 +60,7 @@ struct divider } }; -/** Creates a padded field with an optiona fill character. */ +/** Creates a padded field with an optional fill character. */ struct fpad { explicit fpad(int width_, int pad_ = 0, char fill_ = ' ') @@ -172,7 +172,7 @@ field(T const& t, int width = 8, int pad = 0, bool right = false) template field_t -rfield( +rField( std::basic_string const& text, int width = 8, int pad = 0) @@ -182,7 +182,7 @@ rfield( template field_t -rfield(CharT const* text, int width = 8, int pad = 0) +rField(CharT const* text, int width = 8, int pad = 0) { return field_t, std::allocator>( std:: @@ -195,7 +195,7 @@ rfield(CharT const* text, int width = 8, int pad = 0) template field_t -rfield(T const& t, int width = 8, int pad = 0) +rField(T const& t, int width = 8, int pad = 0) { std::string const text(detail::to_string(t)); return field(text, width, pad, true); diff --git a/src/xrpld/perflog/detail/PerfLogImp.cpp b/src/xrpld/perflog/detail/PerfLogImp.cpp index 4c0c4d2f6f..ceacb41223 100644 --- a/src/xrpld/perflog/detail/PerfLogImp.cpp +++ b/src/xrpld/perflog/detail/PerfLogImp.cpp @@ -103,7 +103,7 @@ PerfLogImp::Counters::countersJson() const rpcobj[jss::total] = totalRpcJson; } - Json::Value jqobj(Json::objectValue); + Json::Value jobQueueObj(Json::objectValue); // totalJq represents all jobs. All enqueued, started, finished, etc. Jq totalJq; for (auto const& proc : jq_) @@ -132,7 +132,7 @@ PerfLogImp::Counters::countersJson() const j[jss::running_duration_us] = std::to_string(value.runningDuration.count()); totalJq.runningDuration += value.runningDuration; - jqobj[JobTypes::name(proc.first)] = j; + jobQueueObj[JobTypes::name(proc.first)] = j; } if (totalJq.queued) @@ -145,14 +145,14 @@ PerfLogImp::Counters::countersJson() const std::to_string(totalJq.queuedDuration.count()); totalJqJson[jss::running_duration_us] = std::to_string(totalJq.runningDuration.count()); - jqobj[jss::total] = totalJqJson; + jobQueueObj[jss::total] = totalJqJson; } Json::Value counters(Json::objectValue); // Be kind to reporting tools and let them expect rpc and jq objects // even if empty. counters[jss::rpc] = rpcobj; - counters[jss::job_queue] = jqobj; + counters[jss::job_queue] = jobQueueObj; return counters; } 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..30dae16e29 100644 --- a/src/xrpld/rpc/detail/RPCCall.cpp +++ b/src/xrpld/rpc/detail/RPCCall.cpp @@ -434,7 +434,7 @@ private: return jvRequest; } - // Return an error for attemping to subscribe/unsubscribe via RPC. + // Return an error for attempting to subscribe/unsubscribe via RPC. Json::Value parseEvented(Json::Value const& jvParams) { @@ -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}, @@ -1357,7 +1357,7 @@ JSONRPCRequest( namespace { // Special local exception type thrown when request can't be parsed. -class RequestNotParseable : public std::runtime_error +class RequestNotParsable : public std::runtime_error { using std::runtime_error::runtime_error; // Inherit constructors }; @@ -1399,7 +1399,7 @@ struct RPCCallImp JLOG(j.debug()) << "RPC reply: " << strData << std::endl; if (strData.find("Unable to parse request") == 0 || strData.find(jss::invalid_API_version.c_str()) == 0) - Throw(strData); + Throw(strData); Json::Reader reader; Json::Value jvReply; if (!reader.parse(strData, jvReply)) @@ -1618,7 +1618,7 @@ rpcClient( // YYY We could have a command line flag for single line output for // scripts. YYY We would intercept output here and simplify it. } - catch (RequestNotParseable& e) + catch (RequestNotParsable& e) { jvOutput = rpcError(rpcINVALID_PARAMS); jvOutput["error_what"] = e.what(); diff --git a/src/xrpld/rpc/detail/RPCHelpers.cpp b/src/xrpld/rpc/detail/RPCHelpers.cpp index d10f4f9a5a..187f06a78e 100644 --- a/src/xrpld/rpc/detail/RPCHelpers.cpp +++ b/src/xrpld/rpc/detail/RPCHelpers.cpp @@ -95,7 +95,7 @@ readLimitField( Tuning::LimitRange const& range, JsonContext const& context) { - limit = range.rdefault; + limit = range.rDefault; if (!context.params.isMember(jss::limit) || context.params[jss::limit].isNull()) return std::nullopt; 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/ServerHandler.cpp b/src/xrpld/rpc/detail/ServerHandler.cpp index 91b709bc06..bb84b81566 100644 --- a/src/xrpld/rpc/detail/ServerHandler.cpp +++ b/src/xrpld/rpc/detail/ServerHandler.cpp @@ -619,7 +619,8 @@ ServerHandler::processRequest( { HTTPReply( 400, - "Unable to parse request: " + reader.getFormatedErrorMessages(), + "Unable to parse request: " + + reader.getFormattedErrorMessages(), output, rpcJ); return; @@ -814,7 +815,7 @@ ServerHandler::processRequest( else if (!params.isArray() || params.size() != 1) { usage.charge(Resource::feeMalformedRPC); - HTTPReply(400, "params unparseable", output, rpcJ); + HTTPReply(400, "params unparsable", output, rpcJ); return; } else @@ -823,7 +824,7 @@ ServerHandler::processRequest( if (!params.isObjectOrNull()) { usage.charge(Resource::feeMalformedRPC); - HTTPReply(400, "params unparseable", output, rpcJ); + HTTPReply(400, "params unparsable", output, rpcJ); return; } } 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/detail/Tuning.h b/src/xrpld/rpc/detail/Tuning.h index 5837146b02..c0b939a4fe 100644 --- a/src/xrpld/rpc/detail/Tuning.h +++ b/src/xrpld/rpc/detail/Tuning.h @@ -11,7 +11,7 @@ namespace Tuning { /** Represents RPC limit parameter values that have a min, default and max. */ struct LimitRange { - unsigned int rmin, rdefault, rmax; + unsigned int rmin, rDefault, rmax; }; /** Limits for the account_lines command. */ diff --git a/src/xrpld/rpc/handlers/AccountInfo.cpp b/src/xrpld/rpc/handlers/AccountInfo.cpp index 30d16e3099..61d0658b4a 100644 --- a/src/xrpld/rpc/handlers/AccountInfo.cpp +++ b/src/xrpld/rpc/handlers/AccountInfo.cpp @@ -216,7 +216,7 @@ doAccountInfo(RPC::JsonContext& context) // Documentation states this is returned as part of the account_info // response, but previously the code put it under account_data. We - // can move this to the documentated location from apiVersion 2 + // can move this to the documented location from apiVersion 2 // onwards. if (context.apiVersion == 1) { @@ -262,7 +262,7 @@ doAccountInfo(RPC::JsonContext& context) { XRPL_ASSERT( prevSeqProxy < tx.seqProxy, - "rpple::doAccountInfo : first sorted proxy"); + "doAccountInfo : first sorted proxy"); prevSeqProxy = tx.seqProxy; jvTx[jss::seq] = tx.seqProxy.value(); ++seqCount; @@ -274,7 +274,7 @@ doAccountInfo(RPC::JsonContext& context) { XRPL_ASSERT( prevSeqProxy < tx.seqProxy, - "rpple::doAccountInfo : second sorted proxy"); + "doAccountInfo : second sorted proxy"); prevSeqProxy = tx.seqProxy; jvTx[jss::ticket] = tx.seqProxy.value(); ++ticketCount; diff --git a/src/xrpld/rpc/handlers/AccountTx.cpp b/src/xrpld/rpc/handlers/AccountTx.cpp index 362bdd0eaa..77d388c190 100644 --- a/src/xrpld/rpc/handlers/AccountTx.cpp +++ b/src/xrpld/rpc/handlers/AccountTx.cpp @@ -340,7 +340,7 @@ populateJsonResponse( // LCOV_EXCL_START UNREACHABLE( "xrpl::populateJsonResponse : missing " - "transaction medatata"); + "transaction metadata"); // LCOV_EXCL_STOP } } 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) diff --git a/src/xrpld/rpc/handlers/Subscribe.cpp b/src/xrpld/rpc/handlers/Subscribe.cpp index 018268defb..09d4a54e55 100644 --- a/src/xrpld/rpc/handlers/Subscribe.cpp +++ b/src/xrpld/rpc/handlers/Subscribe.cpp @@ -334,7 +334,7 @@ doSubscribe(RPC::JsonContext& context) field == jss::asks ? reversed(book) : book, takerID ? *takerID : noAccount(), false, - RPC::Tuning::bookOffers.rdefault, + RPC::Tuning::bookOffers.rDefault, jvMarker, jvOffers);