Compare commits

..

45 Commits

Author SHA1 Message Date
Ed Hennis
21d66cbe78 Fix build error 2025-11-26 10:43:42 -05:00
Ed Hennis
3be46bc7d9 [WIP] Checkpoint 2025-11-26 00:21:40 -05:00
Ed Hennis
359622981e [WIP] Checkpoint 2025-11-25 00:01:53 -05:00
Ed Hennis
59e6a8107a Merge branch 'develop' into ximinez/lending-number-simple 2025-11-24 21:49:58 -05:00
Bart
b550dc00ed ci: Remove missing commits check (#6077)
This change removes the CI check for missing commits, as well as a stray path to the publish-docs workflow that isn't used in the on-trigger workflow.
2025-11-24 21:43:39 -05:00
Jingchen
21c02232a5 refactor: Retire RequireFullyCanonicalSig amendment (#6035)
Amendments activated for more than 2 years can be retired. This change retires the RequireFullyCanonicalSig amendment.
2025-11-24 13:58:37 +00:00
Jingchen
a791c03dc1 refactor: Retire DeletableAccounts amendment (#6056)
Amendments activated for more than 2 years can be retired. This change retires the DeletableAccounts amendment.
2025-11-24 11:52:08 +00:00
Jingchen
800a315383 refactor: Retire CryptoConditionsSuite amendment (#6036)
Amendments activated for more than 2 years can be retired. This change retires the CryptoConditionsSuite amendment.
2025-11-24 06:23:16 -05:00
Olek
8449c6c365 Fix: nullptr resolving without db config (#6029)
If the config disables SQL db usage, such as a validator:

```
[ledger_tx_tables]
use_tx_tables = 0
```

then the pointer to DB engine is null, but it was still resolved during startup. Although it didn't crash in Release mode, possibly due to the compiler optimizing it away, it did crash in Debug mode. This change explicitly checks for the validity of the pointer and generates a runtime error if not set.
2025-11-21 22:20:45 +00:00
Vito Tumas
58e03190ac docs: Improve VaultWithdraw documentation (#6068) 2025-11-21 16:59:12 -05:00
Ed Hennis
92388c4491 Merge branch 'develop' into ximinez/lending-number-simple 2025-11-21 14:38:58 -05:00
Jingchen
fb74dc28e1 chore: Clean up comment in NetworkOps_test.cpp (#6066)
This change removes a copyright notice that was accidentally copied over from another file.
2025-11-21 17:11:00 +00:00
Pratik Mankawde
e4dccfd49b refactor: Retire DisallowIncoming amendment (#6045)
Amendments activated for more than 2 years can be retired. This change retires the DisallowIncoming amendment.
2025-11-21 15:18:00 +00:00
Jingchen
57f4b4eb7f refactor: Retire Checks amendment (#6055)
Amendments activated for more than 2 years can be retired. This change retires the Checks amendment.
2025-11-21 14:19:43 +00:00
Ayaz Salikhov
adbeb94c2b ci: Only upload artifacts in XRPLF repo owner (#6060)
This change prevents uploading too many artifacts in non-public repositories.
2025-11-20 18:09:03 +00:00
Mayukha Vadari
a3d4be4eaf fix: Set correct index for limit in book_offers CLI (#6043)
This change fixes an indexing typo in the `book_offers` CLI processing, and does not affect the HTTPS/WS RPC processing.
2025-11-20 06:37:28 -05:00
Olek
6ff495fd9b Fix: Perform array size check (#6030)
The `ledger_entry` and `deposit_preauth` requests require an array of credentials. However, the array size is not checked before is gets processing. This fix adds checks and return errors in case array size is too big.
2025-11-19 16:58:18 +00:00
Ed Hennis
e45d847558 Merge branch 'develop' into ximinez/lending-number-simple 2025-11-18 22:51:51 -05:00
sunnyraindy
ad37461ab2 chore: Fix some typos in comments (#6040) 2025-11-18 20:21:35 -05:00
Mayukha Vadari
d9c27da529 refactor: split up RPCHelpers.h into two (#6047)
This PR splits `RPCHelpers.h` into two files, by moving out all the ledger-fetching-related functions into a separate file, `RPCLedgerHelpers.h`. It also moves `getAccountObjects` to `AccountObjects.h`, since it is only used in that one place.
2025-11-18 15:44:39 -05:00
Bart
3fb6acd29e ci: Fix filtering out of Clang 20+ on ARM (#6046)
This change fixes the strategy matrix check to filter out the Clang 20+ on ARM, which still fail due to problems with Boost.
2025-11-17 21:54:13 +00:00
Bart
77b7cef5a7 ci: Use new Debian Trixie images (#6034)
This change uses the new Debian Trixie CI images added by XRPLF/ci#83.
2025-11-17 19:31:19 +00:00
Jingchen
2c187461cc refactor: Retire NegativeUNL amendment (#6033)
Amendments activated for more than 2 years can be retired. This change retires the NegativeUNL amendment.
2025-11-17 14:02:10 +00:00
Ed Hennis
546bfa89d8 For now, skip the larger mantissas in AMM transactions and tests 2025-11-16 20:59:17 -05:00
Ed Hennis
470c9c3936 Fix root2, and add tests for it 2025-11-16 00:18:51 -05:00
Ed Hennis
9f50cc033e Merge branch 'develop' into ximinez/lending-number-simple 2025-11-15 03:13:10 -05:00
Ed Hennis
a5f43fb59b Fix some build errors - unused variables, large constants 2025-11-15 02:59:56 -05:00
Ed Hennis
3451d15e12 Step 3: Automatically switch precision in the transaction engine
- Default Number outside of transaction processing to be "large" so RPC
  will work.
2025-11-15 02:55:48 -05:00
Ed Hennis
595a5ee220 Step 2.5cont: Make some updates to STNumber
- Added test cases min int64.
- Updated numberFromJson range checking to use the larger range
  available from Number.
2025-11-15 00:50:59 -05:00
Ed Hennis
c9ad49faf3 Step 2.5: Run the STNumber tests using both mantissa sizes
- Nothing really needed to be changed in the tests, but I added a couple
  of test cases for the min and max int64.
2025-11-14 19:41:26 -05:00
Ed Hennis
857eaffa55 refactor: Move the mantissa_scale enum into the MantissaRange struct 2025-11-14 19:06:44 -05:00
Ed Hennis
93109918ed Fix Number::power(), and a bunch of Number unit tests 2025-11-14 18:51:01 -05:00
Ed Hennis
fbcd4f33eb Add more edge case Number tests 2025-11-14 15:10:10 -05:00
Ed Hennis
6f1fe5047b Step 2 cont. Refactor the to_string(Number) test 2025-11-14 12:40:54 -05:00
Ed Hennis
4cf22b50de fixup! Step 2: Add the ability to change the mantissa range
- Fix cross-compiler build issues
2025-11-14 11:33:09 -05:00
Ed Hennis
606e3ec0b7 Step 2: Add the ability to change the mantissa range
- Update tests. Unfinished.
- TODO: Finish Number tests. Use both modes for STNumber tests. Move
  mantissa_scale into MantissaRange.
2025-11-14 02:34:56 -05:00
Ed Hennis
2eca3dca89 Merge remote-tracking branch 'upstream/develop' into ximinez/lending-number-simple
* upstream/develop:
  chore: Clean up incorrect comments (6031)
  refactor: Retire MultiSignReserve and ExpandedSignerList amendments (5981)
2025-11-13 11:01:22 -05:00
Ed Hennis
2881aade2c Fix Vault unit tests for default fields with value 0.
- Field will be absent in RPC results instead of returning 0.
2025-11-13 01:53:36 -05:00
Ed Hennis
4abb6d9dfe Turns out there's no to_string(__int128_t) 2025-11-13 00:51:37 -05:00
Ed Hennis
7cd48a7713 fixup! Continue with Step 1 2025-11-12 22:58:06 -05:00
Ed Hennis
d2d403da90 Continue with Step 1
- Track down and fix edge cases.
- Some refactoring and renaming for clarity and simplicity
2025-11-12 20:32:47 -05:00
Ed Hennis
343824332c Merge branch 'develop' into ximinez/lending-number-simple 2025-11-12 14:17:35 -05:00
Ed Hennis
a32b5723e5 fixup! fixup! Step 1: Convert Number to use 128-bit numbers internally 2025-11-12 12:16:18 -05:00
Ed Hennis
3048f55270 fixup! Step 1: Convert Number to use 128-bit numbers internally 2025-11-12 10:14:05 -05:00
Ed Hennis
d030fdaa2b Step 1: Convert Number to use 128-bit numbers internally
- Update the conversion points between Number and *Amount & STNumber.
- Tests probably don't pass.
2025-11-12 00:31:47 -05:00
1252 changed files with 6828 additions and 5659 deletions

View File

@@ -26,11 +26,6 @@ run from the repository root.
references to `ripple` and `rippled` (with or without capital letters) to
`xrpl` and `xrpld`, respectively. The name of the binary will remain as-is,
and will only be renamed to `xrpld` by a later script.
4. `.github/scripts/rename/binary.sh`: This script will rename the binary from
`rippled` to `xrpld`, and reverses the symlink so that `rippled` points to
the `xrpld` binary.
5. `.github/scripts/rename/namespace.sh`: This script will rename the C++
namespaces from `ripple` to `xrpl`.
You can run all these scripts from the repository root as follows:
@@ -38,6 +33,4 @@ You can run all these scripts from the repository root as follows:
./.github/scripts/rename/definitions.sh .
./.github/scripts/rename/copyright.sh .
./.github/scripts/rename/cmake.sh .
./.github/scripts/rename/binary.sh .
./.github/scripts/rename/namespace.sh .
```

View File

@@ -1,42 +0,0 @@
#!/bin/bash
# Exit the script as soon as an error occurs.
set -e
# On MacOS, ensure that GNU sed is installed and available as `gsed`.
SED_COMMAND=sed
if [[ "${OSTYPE}" == 'darwin'* ]]; then
if ! command -v gsed &> /dev/null; then
echo "Error: gsed is not installed. Please install it using 'brew install gnu-sed'."
exit 1
fi
SED_COMMAND=gsed
fi
# This script changes the binary name from `rippled` to `xrpld`, and reverses
# the symlink that currently points from `xrpld` to `rippled` so that it points
# from `rippled` to `xrpld` instead.
# Usage: .github/scripts/rename/binary.sh <repository directory>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <repository directory>"
exit 1
fi
DIRECTORY=$1
echo "Processing directory: ${DIRECTORY}"
if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1
fi
pushd ${DIRECTORY}
# Remove the binary name override added by the cmake.sh script.
${SED_COMMAND} -z -i -E 's@\s+# For the time being.+"rippled"\)@@' cmake/XrplCore.cmake
# Reverse the symlink.
${SED_COMMAND} -i -E 's@create_symbolic_link\(rippled@create_symbolic_link(xrpld@' cmake/XrplInstall.cmake
${SED_COMMAND} -i -E 's@/xrpld\$\{suffix\}@/rippled${suffix}@' cmake/XrplInstall.cmake
popd
echo "Processing complete."

View File

@@ -70,9 +70,6 @@ fi
if ! grep -q 'Dev Null' src/test/app/tx/apply_test.cpp; then
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/app/tx/apply_test.cpp)" > src/test/app/tx/apply_test.cpp
fi
if ! grep -q 'Dev Null' src/test/app/NetworkOPs_test.cpp; then
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/app/NetworkOPs_test.cpp)" > src/test/app/NetworkOPs_test.cpp
fi
if ! grep -q 'Dev Null' src/test/rpc/ManifestRPC_test.cpp; then
echo -e "// Copyright (c) 2020 Dev Null Productions\n\n$(cat src/test/rpc/ManifestRPC_test.cpp)" > src/test/rpc/ManifestRPC_test.cpp
fi

View File

@@ -1,54 +0,0 @@
#!/bin/bash
# Exit the script as soon as an error occurs.
set -e
# On MacOS, ensure that GNU sed is installed and available as `gsed`.
SED_COMMAND=sed
if [[ "${OSTYPE}" == 'darwin'* ]]; then
if ! command -v gsed &> /dev/null; then
echo "Error: gsed is not installed. Please install it using 'brew install gnu-sed'."
exit 1
fi
SED_COMMAND=gsed
fi
# This script renames the `ripple` namespace to `xrpl` in this project.
# Specifically, it renames all occurrences of `namespace ripple` and `ripple::`
# to `namespace xrpl` and `xrpl::`, respectively, by scanning all header and
# source files in the specified directory and its subdirectories, as well as any
# occurrences in the documentation.
# Usage: .github/scripts/rename/namespace.sh <repository directory>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <repository directory>"
exit 1
fi
DIRECTORY=$1
echo "Processing directory: ${DIRECTORY}"
if [ ! -d "${DIRECTORY}" ]; then
echo "Error: Directory '${DIRECTORY}' does not exist."
exit 1
fi
pushd ${DIRECTORY}
DIRECTORIES=("include" "src" "tests")
for DIRECTORY in "${DIRECTORIES[@]}"; do
echo "Processing directory: ${DIRECTORY}"
find "${DIRECTORY}" -type f \( -name "*.h" -o -name "*.hpp" -o -name "*.ipp" -o -name "*.cpp" \) | while read -r FILE; do
echo "Processing file: ${FILE}"
${SED_COMMAND} -i 's/namespace ripple/namespace xrpl/g' "${FILE}"
${SED_COMMAND} -i 's/ripple::/xrpl::/g' "${FILE}"
done
done
DIRECTORY=$1
find "${DIRECTORY}" -type f -name "*.md" | while read -r FILE; do
echo "Processing file: ${FILE}"
${SED_COMMAND} -i 's/ripple::/xrpl::/g' "${FILE}"
done
popd
echo "Renaming complete."

View File

@@ -130,8 +130,8 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
if os['distro_name'] == 'rhel' and architecture['platform'] == 'linux/arm64':
continue
# We skip all clang-20 on arm64 due to boost 1.86 build error
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and architecture['platform'] == 'linux/arm64':
# We skip all clang 20+ on arm64 due to Boost build error.
if f'{os['compiler_name']}-{os['compiler_version']}' in ['clang-20', 'clang-21'] and architecture['platform'] == 'linux/arm64':
continue
# Enable code coverage for Debian Bookworm using GCC 15 in Debug and no

View File

@@ -15,63 +15,91 @@
"distro_version": "bookworm",
"compiler_name": "gcc",
"compiler_version": "12",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "gcc",
"compiler_version": "13",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "gcc",
"compiler_version": "14",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "gcc",
"compiler_version": "15",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "16",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "17",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "18",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "19",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "bookworm",
"compiler_name": "clang",
"compiler_version": "20",
"image_sha": "e1782cd"
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "trixie",
"compiler_name": "gcc",
"compiler_version": "14",
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "trixie",
"compiler_name": "gcc",
"compiler_version": "15",
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "trixie",
"compiler_name": "clang",
"compiler_version": "20",
"image_sha": "0525eae"
},
{
"distro_name": "debian",
"distro_version": "trixie",
"compiler_name": "clang",
"compiler_version": "21",
"image_sha": "0525eae"
},
{
"distro_name": "rhel",

View File

@@ -14,9 +14,7 @@ on:
- "master"
paths:
# These paths are unique to `on-trigger.yml`.
- ".github/workflows/reusable-check-missing-commits.yml"
- ".github/workflows/on-trigger.yml"
- ".github/workflows/publish-docs.yml"
# Keep the paths below in sync with those in `on-pr.yml`.
- ".github/actions/build-deps/**"
@@ -63,10 +61,6 @@ defaults:
shell: bash
jobs:
check-missing-commits:
if: ${{ github.event_name == 'push' && github.ref_type == 'branch' && contains(fromJSON('["develop", "release"]'), github.ref_name) }}
uses: ./.github/workflows/reusable-check-missing-commits.yml
build-test:
uses: ./.github/workflows/reusable-build-test.yml
strategy:

View File

@@ -129,14 +129,14 @@ jobs:
--parallel "${BUILD_NPROC}" \
--target "${CMAKE_TARGET}"
- name: Upload the binary (Linux)
if: ${{ runner.os == 'Linux' }}
- name: Upload rippled artifact (Linux)
if: ${{ github.repository_owner == 'XRPLF' && runner.os == 'Linux' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
env:
BUILD_DIR: ${{ inputs.build_dir }}
with:
name: xrpld-${{ inputs.config_name }}
path: ${{ env.BUILD_DIR }}/xrpld
name: rippled-${{ inputs.config_name }}
path: ${{ env.BUILD_DIR }}/rippled
retention-days: 3
if-no-files-found: error
@@ -144,8 +144,8 @@ jobs:
if: ${{ runner.os == 'Linux' }}
working-directory: ${{ inputs.build_dir }}
run: |
ldd ./xrpld
if [ "$(ldd ./xrpld | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then
ldd ./rippled
if [ "$(ldd ./rippled | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then
echo 'The binary is statically linked.'
else
echo 'The binary is dynamically linked.'
@@ -156,7 +156,7 @@ jobs:
if: ${{ runner.os == 'Linux' && env.ENABLED_VOIDSTAR == 'true' }}
working-directory: ${{ inputs.build_dir }}
run: |
./xrpld --version | grep libvoidstar
./rippled --version | grep libvoidstar
- name: Run the separate tests
if: ${{ !inputs.build_only }}
@@ -177,7 +177,7 @@ jobs:
env:
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
run: |
./xrpld --unittest --unittest-jobs "${BUILD_NPROC}"
./rippled --unittest --unittest-jobs "${BUILD_NPROC}"
- name: Debug failure (Linux)
if: ${{ failure() && runner.os == 'Linux' && !inputs.build_only }}

View File

@@ -25,7 +25,7 @@ jobs:
env:
MESSAGE: |
The dependency relationships between the modules in xrpld have
The dependency relationships between the modules in rippled have
changed, which may be an improvement or a regression.
A rule of thumb is that if your changes caused something to be

View File

@@ -1,62 +0,0 @@
# This workflow checks that all commits in the "master" branch are also in the
# "release" and "develop" branches, and that all commits in the "release" branch
# are also in the "develop" branch.
name: Check for missing commits
# This workflow can only be triggered by other workflows.
on: workflow_call
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-missing-commits
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
fetch-depth: 0
- name: Check for missing commits
env:
MESSAGE: |
If you are reading this, then the commits indicated above are missing
from the "develop" and/or "release" branch. Do a reverse-merge as soon
as possible. See CONTRIBUTING.md for instructions.
run: |
set -o pipefail
# Branches are ordered by how "canonical" they are. Every commit in one
# branch should be in all the branches behind it.
order=(master release develop)
branches=()
for branch in "${order[@]}"; do
# Check that the branches exist so that this job will work on forked
# repos, which don't necessarily have master and release branches.
echo "Checking if ${branch} exists."
if git ls-remote --exit-code --heads origin \
refs/heads/${branch} > /dev/null; then
branches+=(origin/${branch})
fi
done
prior=()
for branch in "${branches[@]}"; do
if [[ ${#prior[@]} -ne 0 ]]; then
echo "Checking ${prior[@]} for commits missing from ${branch}."
git log --oneline --no-merges "${prior[@]}" \
^$branch | tee -a "missing-commits.txt"
echo
fi
prior+=("${branch}")
done
if [[ $(cat missing-commits.txt | wc -l) -ne 0 ]]; then
echo "${MESSAGE}"
exit 1
fi

View File

@@ -25,10 +25,6 @@ jobs:
run: .github/scripts/rename/copyright.sh .
- name: Check CMake configs
run: .github/scripts/rename/cmake.sh .
- name: Check binary name
run: .github/scripts/rename/binary.sh .
- name: Check namespaces
run: .github/scripts/rename/namespace.sh .
- name: Check for differences
env:
MESSAGE: |

View File

@@ -299,7 +299,7 @@ For this reason:
- Example **bad** name
`"RFC1751::insert(char* s, int x, int start, int length) : length is greater than or equal zero"`
(missing namespace, unnecessary full function signature, description too verbose).
Good name: `"xrpl::RFC1751::insert : minimum length"`.
Good name: `"ripple::RFC1751::insert : minimum length"`.
- In **few** well-justified cases a non-standard name can be used, in which case a
comment should be placed to explain the rationale (example in `contract.cpp`)
- Do **not** rename a contract without a good reason (e.g. the name no longer

View File

@@ -223,4 +223,6 @@ if(xrpld)
src/test/ledger/Invariants_test.cpp
PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)
endif()
# For the time being, we will keep the name of the binary as it was.
set_target_properties(xrpld PROPERTIES OUTPUT_NAME "rippled")
endif()

View File

@@ -67,8 +67,8 @@ if (is_root_project AND TARGET xrpld)
install(CODE "
set(CMAKE_MODULE_PATH \"${CMAKE_MODULE_PATH}\")
include(create_symbolic_link)
create_symbolic_link(xrpld${suffix} \
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/rippled${suffix})
create_symbolic_link(rippled${suffix} \
\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/xrpld${suffix})
")
endif ()

View File

@@ -541,7 +541,7 @@ SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact(
/** Verify an ECDSA signature.
*
* Returns: 1: correct signature
* 0: incorrect or unparseable signature
* 0: incorrect or unparsable signature
* Args: ctx: pointer to a context object
* In: sig: the signature being verified.
* msghash32: the 32-byte message hash being verified.

View File

@@ -3,7 +3,7 @@
#include <boost/filesystem.hpp>
namespace xrpl {
namespace ripple {
/** Extract a tar archive compressed with lz4
@@ -17,6 +17,6 @@ extractTarLz4(
boost::filesystem::path const& src,
boost::filesystem::path const& dst);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -12,7 +12,7 @@
#include <unordered_map>
#include <vector>
namespace xrpl {
namespace ripple {
using IniFileSections =
std::unordered_map<std::string, std::vector<std::string>>;
@@ -380,6 +380,6 @@ get_if_exists<bool>(Section const& section, std::string const& name, bool& v)
return stat;
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,13 +3,13 @@
#include <vector>
namespace xrpl {
namespace ripple {
/** Storage for linear binary data.
Blocks of binary data appear often in various idioms and structures.
*/
using Blob = std::vector<unsigned char>;
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -8,7 +8,7 @@
#include <cstring>
#include <memory>
namespace xrpl {
namespace ripple {
/** Like std::vector<char> but better.
Meets the requirements of BufferFactory.
@@ -96,7 +96,7 @@ public:
XRPL_ASSERT(
s.size() == 0 || size_ == 0 || s.data() < p_.get() ||
s.data() >= p_.get() + size_,
"xrpl::Buffer::operator=(Slice) : input not a subset");
"ripple::Buffer::operator=(Slice) : input not a subset");
if (auto p = alloc(s.size()))
std::memcpy(p, s.data(), s.size());
@@ -215,6 +215,6 @@ operator!=(Buffer const& lhs, Buffer const& rhs) noexcept
return !(lhs == rhs);
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -1,7 +1,7 @@
#ifndef XRPL_BASICS_BYTEUTILITIES_H_INCLUDED
#define XRPL_BASICS_BYTEUTILITIES_H_INCLUDED
namespace xrpl {
namespace ripple {
template <class T>
constexpr auto
@@ -19,6 +19,6 @@ megabytes(T value) noexcept
static_assert(kilobytes(2) == 2048, "kilobytes(2) == 2048");
static_assert(megabytes(3) == 3145728, "megabytes(3) == 3145728");
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -10,7 +10,7 @@
#include <stdexcept>
#include <vector>
namespace xrpl {
namespace ripple {
namespace compression_algorithms {
@@ -144,6 +144,6 @@ lz4Decompress(
} // namespace compression_algorithms
} // namespace xrpl
} // namespace ripple
#endif // XRPL_COMPRESSIONALGORITHMS_H_INCLUDED

View File

@@ -8,7 +8,7 @@
#include <utility>
#include <vector>
namespace xrpl {
namespace ripple {
/** Manages all counted object types. */
class CountedObjects
@@ -133,6 +133,6 @@ public:
}
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -4,7 +4,7 @@
#include <chrono>
#include <cmath>
namespace xrpl {
namespace ripple {
/** Sampling function using exponential decay to provide a continuous value.
@tparam The number of seconds in the decay window.
@@ -131,6 +131,6 @@ private:
time_point when_;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -7,7 +7,7 @@
#include <stdexcept>
namespace xrpl {
namespace ripple {
/** Expected is an approximation of std::expected (hoped for in C++23)
@@ -232,6 +232,6 @@ public:
}
};
} // namespace xrpl
} // namespace ripple
#endif // XRPL_BASICS_EXPECTED_H_INCLUDED

View File

@@ -6,7 +6,7 @@
#include <optional>
namespace xrpl {
namespace ripple {
std::string
getFileContents(
@@ -20,6 +20,6 @@ writeFileContents(
boost::filesystem::path const& destPath,
std::string const& contents);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <type_traits>
#include <utility>
namespace xrpl {
namespace ripple {
//------------------------------------------------------------------------------
@@ -492,5 +492,5 @@ dynamic_pointer_cast(TT const& v)
return SharedPtr<T>(DynamicCastTagSharedIntrusive{}, v);
}
} // namespace intr_ptr
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <utility>
namespace xrpl {
namespace ripple {
template <class T>
template <CAdoptTag TAdoptTag>
@@ -608,7 +608,7 @@ SharedWeakUnion<T>::convertToStrong()
[[maybe_unused]] auto action = p->releaseWeakRef();
XRPL_ASSERT(
(action == ReleaseWeakRefAction::noop),
"xrpl::SharedWeakUnion::convertToStrong : "
"ripple::SharedWeakUnion::convertToStrong : "
"action is noop");
unsafeSetRawPtr(p, RefStrength::strong);
return true;
@@ -637,7 +637,7 @@ SharedWeakUnion<T>::convertToWeak()
// We just added a weak ref. How could we destroy?
// LCOV_EXCL_START
UNREACHABLE(
"xrpl::SharedWeakUnion::convertToWeak : destroying freshly "
"ripple::SharedWeakUnion::convertToWeak : destroying freshly "
"added ref");
delete p;
unsafeSetRawPtr(nullptr);
@@ -719,5 +719,5 @@ SharedWeakUnion<T>::unsafeReleaseNoStore()
}
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <atomic>
#include <cstdint>
namespace xrpl {
namespace ripple {
/** Action to perform when releasing a strong pointer.
@@ -34,7 +34,7 @@ enum class ReleaseWeakRefAction { noop, destroy };
/** Implement the strong count, weak count, and bit flags for an intrusive
pointer.
A class can satisfy the requirements of a xrpl::IntrusivePointer by
A class can satisfy the requirements of a ripple::IntrusivePointer by
inheriting from this class.
*/
struct IntrusiveRefCounts
@@ -257,7 +257,7 @@ IntrusiveRefCounts::releaseStrongRef() const
RefCountPair const prevVal{prevIntVal};
XRPL_ASSERT(
(prevVal.strong >= strongDelta),
"xrpl::IntrusiveRefCounts::releaseStrongRef : previous ref "
"ripple::IntrusiveRefCounts::releaseStrongRef : previous ref "
"higher than new");
auto nextIntVal = prevIntVal - strongDelta;
ReleaseStrongRefAction action = noop;
@@ -282,7 +282,7 @@ IntrusiveRefCounts::releaseStrongRef() const
// twice.
XRPL_ASSERT(
(action == noop) || !(prevIntVal & partialDestroyStartedMask),
"xrpl::IntrusiveRefCounts::releaseStrongRef : not in partial "
"ripple::IntrusiveRefCounts::releaseStrongRef : not in partial "
"destroy");
return action;
}
@@ -314,7 +314,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const
// can't happen twice.
XRPL_ASSERT(
(!prevVal.partialDestroyStartedBit),
"xrpl::IntrusiveRefCounts::addWeakReleaseStrongRef : not in "
"ripple::IntrusiveRefCounts::addWeakReleaseStrongRef : not in "
"partial destroy");
auto nextIntVal = prevIntVal + delta;
@@ -336,7 +336,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const
{
XRPL_ASSERT(
(!(prevIntVal & partialDestroyStartedMask)),
"xrpl::IntrusiveRefCounts::addWeakReleaseStrongRef : not "
"ripple::IntrusiveRefCounts::addWeakReleaseStrongRef : not "
"started partial destroy");
return action;
}
@@ -408,11 +408,11 @@ inline IntrusiveRefCounts::~IntrusiveRefCounts() noexcept
auto v = refCounts.load(std::memory_order_acquire);
XRPL_ASSERT(
(!(v & valueMask)),
"xrpl::IntrusiveRefCounts::~IntrusiveRefCounts : count must be zero");
"ripple::IntrusiveRefCounts::~IntrusiveRefCounts : count must be zero");
auto t = v & tagMask;
XRPL_ASSERT(
(!t || t == tagMask),
"xrpl::IntrusiveRefCounts::~IntrusiveRefCounts : valid tag");
"ripple::IntrusiveRefCounts::~IntrusiveRefCounts : valid tag");
#endif
}
@@ -427,7 +427,7 @@ inline IntrusiveRefCounts::RefCountPair::RefCountPair(
{
XRPL_ASSERT(
(strong < checkStrongMaxValue && weak < checkWeakMaxValue),
"xrpl::IntrusiveRefCounts::RefCountPair(FieldType) : inputs inside "
"ripple::IntrusiveRefCounts::RefCountPair(FieldType) : inputs inside "
"range");
}
@@ -438,7 +438,7 @@ inline IntrusiveRefCounts::RefCountPair::RefCountPair(
{
XRPL_ASSERT(
(strong < checkStrongMaxValue && weak < checkWeakMaxValue),
"xrpl::IntrusiveRefCounts::RefCountPair(CountType, CountType) : "
"ripple::IntrusiveRefCounts::RefCountPair(CountType, CountType) : "
"inputs inside range");
}
@@ -447,7 +447,7 @@ IntrusiveRefCounts::RefCountPair::combinedValue() const noexcept
{
XRPL_ASSERT(
(strong < checkStrongMaxValue && weak < checkWeakMaxValue),
"xrpl::IntrusiveRefCounts::RefCountPair::combinedValue : inputs "
"ripple::IntrusiveRefCounts::RefCountPair::combinedValue : inputs "
"inside range");
return (static_cast<IntrusiveRefCounts::FieldType>(weak)
<< IntrusiveRefCounts::StrongCountNumBits) |
@@ -465,7 +465,7 @@ partialDestructorFinished(T** o)
XRPL_ASSERT(
(!p.partialDestroyFinishedBit && p.partialDestroyStartedBit &&
!p.strong),
"xrpl::partialDestructorFinished : not a weak ref");
"ripple::partialDestructorFinished : not a weak ref");
if (!p.weak)
{
// There was a weak count before the partial destructor ran (or we would
@@ -479,5 +479,5 @@ partialDestructorFinished(T** o)
}
//------------------------------------------------------------------------------
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -4,10 +4,10 @@
#include <xrpl/basics/TaggedCache.h>
#include <xrpl/basics/base_uint.h>
namespace xrpl {
namespace ripple {
using KeyCache = TaggedCache<uint256, int, true>;
} // namespace xrpl
} // namespace ripple
#endif // XRPL_BASICS_KEYCACHE_H

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <unordered_map>
namespace xrpl {
namespace ripple {
namespace detail {
@@ -109,6 +109,6 @@ LocalValue<T>::operator*()
.emplace(this, std::make_unique<detail::LocalValues::Value<T>>(t_))
.first->second->get());
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -13,7 +13,7 @@
#include <mutex>
#include <utility>
namespace xrpl {
namespace ripple {
// DEPRECATED use beast::severities::Severity instead
enum LogSeverity {
@@ -271,6 +271,6 @@ setDebugLogSink(std::unique_ptr<beast::Journal::Sink> sink);
beast::Journal
debugLog();
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -5,7 +5,7 @@
#include <cassert>
#include <cstddef>
namespace xrpl {
namespace ripple {
/** Calculate one number divided by another number in percentage.
* The result is rounded up to the next integer, and capped in the range [0,100]
@@ -44,6 +44,6 @@ static_assert(calculatePercent(50'000'000, 100'000'000) == 50);
static_assert(calculatePercent(50'000'001, 100'000'000) == 51);
static_assert(calculatePercent(99'999'999, 100'000'000) == 100);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -1,43 +1,116 @@
#ifndef XRPL_BASICS_NUMBER_H_INCLUDED
#define XRPL_BASICS_NUMBER_H_INCLUDED
#include <xrpl/beast/utility/instrumentation.h>
#ifdef _MSC_VER
#include <boost/multiprecision/cpp_int.hpp>
#endif
#include <cstdint>
#include <limits>
#include <optional>
#include <ostream>
#include <string>
namespace xrpl {
namespace ripple {
class Number;
std::string
to_string(Number const& amount);
class Number
template <typename T>
constexpr std::optional<int>
logTen(T value)
{
int log = 0;
while (value >= 10 && value % 10 == 0)
{
value /= 10;
++log;
}
if (value == 1)
return log;
return std::nullopt;
}
template <typename T>
constexpr bool
isPowerOfTen(T value)
{
return logTen(value).has_value();
}
#ifdef _MSC_VER
using numberuint = boost::multiprecision::uint128_t;
using numberint = boost::multiprecision::int128_t;
#else // !defined(_MSC_VER)
using numberuint = __uint128_t;
using numberint = __int128_t;
#endif // !defined(_MSC_VER)
struct MantissaRange
{
using rep = std::int64_t;
rep mantissa_{0};
using internalrep = numberint;
enum mantissa_scale { small, large };
explicit constexpr MantissaRange(mantissa_scale scale_, internalrep min_)
: min(min_)
, max(min_ * 10 - 1)
, log(logTen(min).value_or(-1))
, scale(scale_)
{
}
rep min;
internalrep max;
int log;
mantissa_scale scale;
};
class Number
{
using uint128_t = numberuint;
using int128_t = numberint;
using rep = MantissaRange::rep;
using internalrep = MantissaRange::internalrep;
internalrep mantissa_{0};
int exponent_{std::numeric_limits<int>::lowest()};
public:
// The range for the mantissa when normalized
constexpr static std::int64_t minMantissa = 1'000'000'000'000'000LL;
constexpr static std::int64_t maxMantissa = 9'999'999'999'999'999LL;
// The range for the exponent when normalized
constexpr static int minExponent = -32768;
constexpr static int maxExponent = 32768;
// May need to make unchecked private
struct unchecked
{
explicit unchecked() = default;
};
// Like unchecked, normalized is used with the ctors that take an
// internalrep mantissa. Unlike unchecked, those ctors will normalize the
// value.
// Only unit tests are expected to use this class
struct normalized
{
explicit normalized() = default;
};
explicit constexpr Number() = default;
Number(rep mantissa);
explicit Number(rep mantissa, int exponent);
explicit constexpr Number(rep mantissa, int exponent, unchecked) noexcept;
explicit constexpr Number(
internalrep mantissa,
int exponent,
unchecked) noexcept;
// Only unit tests are expected to use this ctor
explicit Number(internalrep mantissa, int exponent, normalized);
constexpr rep
mantissa() const noexcept;
@@ -67,11 +140,11 @@ public:
Number&
operator/=(Number const& x);
static constexpr Number
static Number
min() noexcept;
static constexpr Number
static Number
max() noexcept;
static constexpr Number
static Number
lowest() noexcept;
/** Conversions to Number are implicit and conversions away from Number
@@ -141,7 +214,7 @@ public:
while (ret.exponent_ < 0 && ret.mantissa_ != 0)
{
ret.exponent_ += 1;
ret.mantissa_ /= rep(10);
ret.mantissa_ /= internalrep(10);
}
// We are guaranteed that normalize() will never throw an exception
// because exponent is either negative or zero at this point.
@@ -173,6 +246,15 @@ public:
return os << to_string(x);
}
friend std::string
to_string(Number const& amount);
friend Number
root(Number f, unsigned d);
friend Number
root2(Number f);
// Thread local rounding control. Default is to_nearest
enum rounding_mode { to_nearest, towards_zero, downward, upward };
static rounding_mode
@@ -181,24 +263,113 @@ public:
static rounding_mode
setround(rounding_mode mode);
static MantissaRange::mantissa_scale
getMantissaScale();
static void
setMantissaScale(MantissaRange::mantissa_scale scale);
template <class T = rep>
inline static T
minMantissa()
{
return range_.get().min;
}
inline static internalrep
maxMantissa()
{
return range_.get().max;
}
inline static int
mantissaLog()
{
return range_.get().log;
}
/// oneSmall is needed because the ranges are private
constexpr static Number
oneSmall();
/// oneLarge is needed because the ranges are private
constexpr static Number
oneLarge();
// And one is needed because it needs to choose between oneSmall and
// oneLarge based on the current range
static Number
one();
template <class T>
[[nodiscard]]
std::pair<T, int>
normalizeToRange(T minMantissa, T maxMantissa) const;
private:
static thread_local rounding_mode mode_;
// The available ranges for mantissa
constexpr static internalrep maxRep =
std::numeric_limits<std::int64_t>::max();
constexpr static MantissaRange smallRange{
MantissaRange::small,
1'000'000'000'000'000LL};
static_assert(isPowerOfTen(smallRange.min));
static_assert(smallRange.max == 9'999'999'999'999'999LL);
static_assert(smallRange.log == 15);
constexpr static MantissaRange largeRange{
MantissaRange::large,
1'000'000'000'000'000'000LL};
static_assert(isPowerOfTen(largeRange.min));
// maxRep 9,223,372,036,854,775,808
static_assert(largeRange.max == internalrep(9'999'999'999'999'999'999ULL));
static_assert(largeRange.log == 18);
static_assert(largeRange.min < maxRep);
static_assert(largeRange.max > maxRep);
// The range for the mantissa when normalized.
// Use reference_wrapper to avoid making copies, and prevent accidentally
// changing the values inside the range.
static thread_local std::reference_wrapper<MantissaRange const> range_;
void
normalize();
constexpr bool
static void
normalize(
internalrep& mantissa,
int& exponent,
internalrep const& minMantissa,
internalrep const& maxMantissa);
bool
isnormal() const noexcept;
// Copy the number, but modify the exponent by "exponentDelta". Because the
// mantissa doesn't change, the result will be "mostly" normalized, but the
// exponent could go out of range, so it will be checked.
Number
shiftExponent(int exponentDelta) const;
class Guard;
};
inline constexpr Number::Number(rep mantissa, int exponent, unchecked) noexcept
inline constexpr Number::Number(
internalrep mantissa,
int exponent,
unchecked) noexcept
: mantissa_{mantissa}, exponent_{exponent}
{
}
inline Number::Number(internalrep mantissa, int exponent, normalized)
: Number(mantissa, exponent, unchecked{})
{
normalize();
}
inline Number::Number(rep mantissa, int exponent)
: mantissa_{mantissa}, exponent_{exponent}
: Number(mantissa, exponent, normalized{})
{
normalize();
}
@@ -210,13 +381,33 @@ inline Number::Number(rep mantissa) : Number{mantissa, 0}
inline constexpr Number::rep
Number::mantissa() const noexcept
{
return mantissa_;
auto m = mantissa_;
while (m > maxRep)
{
XRPL_ASSERT_PARTS(
!isnormal() || m % 10 == 0,
"ripple::Number::mantissa",
"large normalized mantissa has no remainder");
m /= 10;
}
return static_cast<Number::rep>(m);
}
inline constexpr int
Number::exponent() const noexcept
{
return exponent_;
auto m = mantissa_;
auto e = exponent_;
while (m > maxRep)
{
XRPL_ASSERT_PARTS(
!isnormal() || m % 10 == 0,
"ripple::Number::exponent",
"large normalized mantissa has no remainder");
m /= 10;
++e;
}
return e;
}
inline constexpr Number
@@ -236,7 +427,7 @@ Number::operator-() const noexcept
inline Number&
Number::operator++()
{
*this += Number{1000000000000000, -15, unchecked{}};
*this += one();
return *this;
}
@@ -251,7 +442,7 @@ Number::operator++(int)
inline Number&
Number::operator--()
{
*this -= Number{1000000000000000, -15, unchecked{}};
*this -= one();
return *this;
}
@@ -301,32 +492,45 @@ operator/(Number const& x, Number const& y)
return z;
}
inline constexpr Number
inline Number
Number::min() noexcept
{
return Number{minMantissa, minExponent, unchecked{}};
return Number{range_.get().min, minExponent, unchecked{}};
}
inline constexpr Number
inline Number
Number::max() noexcept
{
return Number{maxMantissa, maxExponent, unchecked{}};
return Number{range_.get().max, maxExponent, unchecked{}};
}
inline constexpr Number
inline Number
Number::lowest() noexcept
{
return -Number{maxMantissa, maxExponent, unchecked{}};
return -Number{range_.get().max, maxExponent, unchecked{}};
}
inline constexpr bool
inline bool
Number::isnormal() const noexcept
{
MantissaRange const& range = range_;
auto const abs_m = mantissa_ < 0 ? -mantissa_ : mantissa_;
return minMantissa <= abs_m && abs_m <= maxMantissa &&
return range.min <= abs_m && abs_m <= range.max &&
(abs_m <= maxRep || abs_m % 10 == 0) &&
minExponent <= exponent_ && exponent_ <= maxExponent;
}
template <class T>
std::pair<T, int>
Number::normalizeToRange(T minMantissa, T maxMantissa) const
{
internalrep mantissa = mantissa_;
int exponent = exponent_;
Number::normalize(mantissa, exponent, minMantissa, maxMantissa);
return std::make_pair(static_cast<T>(mantissa), exponent);
}
inline constexpr Number
abs(Number x) noexcept
{
@@ -366,6 +570,20 @@ squelch(Number const& x, Number const& limit) noexcept
return x;
}
inline std::string
to_string(MantissaRange::mantissa_scale const& scale)
{
switch (scale)
{
case MantissaRange::small:
return "small";
case MantissaRange::large:
return "large";
default:
throw std::runtime_error("Bad scale");
}
}
class saveNumberRoundMode
{
Number::rounding_mode mode_;
@@ -404,6 +622,33 @@ public:
operator=(NumberRoundModeGuard const&) = delete;
};
} // namespace xrpl
// Sets the new scale and restores the old scale when it leaves scope. Since
// Number doesn't have that facility, we'll build it here.
//
// This class may only end up needed in tests
class NumberMantissaScaleGuard
{
MantissaRange::mantissa_scale saved_;
public:
explicit NumberMantissaScaleGuard(
MantissaRange::mantissa_scale scale) noexcept
: saved_{Number::getMantissaScale()}
{
Number::setMantissaScale(scale);
}
~NumberMantissaScaleGuard()
{
Number::setMantissaScale(saved_);
}
NumberMantissaScaleGuard(NumberMantissaScaleGuard const&) = delete;
NumberMantissaScaleGuard&
operator=(NumberMantissaScaleGuard const&) = delete;
};
} // namespace ripple
#endif // XRPL_BASICS_NUMBER_H_INCLUDED

View File

@@ -21,11 +21,11 @@ ripple/basic should contain no dependencies on other modules.
- `std::set`
- For sorted containers.
- `xrpl::hash_set`
- `ripple::hash_set`
- Where inserts and contains need to be O(1).
- For "small" sets, `std::set` might be faster and smaller.
- `xrpl::hardened_hash_set`
- `ripple::hardened_hash_set`
- For data sets where the key could be manipulated by an attacker
in an attempt to mount an algorithmic complexity attack: see
http://en.wikipedia.org/wiki/Algorithmic_complexity_attack
@@ -33,5 +33,5 @@ ripple/basic should contain no dependencies on other modules.
The following container is deprecated
- `std::unordered_set`
- Use `xrpl::hash_set` instead, which uses a better hashing algorithm.
- Or use `xrpl::hardened_hash_set` to prevent algorithmic complexity attacks.
- Use `ripple::hash_set` instead, which uses a better hashing algorithm.
- Or use `ripple::hardened_hash_set` to prevent algorithmic complexity attacks.

View File

@@ -11,7 +11,7 @@
#include <string>
#include <vector>
namespace xrpl {
namespace ripple {
/** A closed interval over the domain T.
@@ -85,7 +85,7 @@ to_string(RangeSet<T> const& rs)
std::string s;
for (auto const& interval : rs)
s += xrpl::to_string(interval) + ",";
s += ripple::to_string(interval) + ",";
s.pop_back();
return s;
@@ -172,6 +172,6 @@ prevMissing(RangeSet<T> const& rs, T t, T minVal = 0)
return boost::icl::last(tgt);
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <functional>
#include <vector>
namespace xrpl {
namespace ripple {
class Resolver
{
@@ -47,6 +47,6 @@ public:
/** @} */
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <boost/asio/io_context.hpp>
namespace xrpl {
namespace ripple {
class ResolverAsio : public Resolver
{
@@ -17,6 +17,6 @@ public:
New(boost::asio::io_context&, beast::Journal);
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <ostream>
namespace xrpl {
namespace ripple {
// A SHAMapHash is the hash of a node in a SHAMap, and also the
// type of the hash of the entire SHAMap.
@@ -97,6 +97,6 @@ extract(SHAMapHash const& key)
return *reinterpret_cast<std::size_t const*>(key.as_uint256().data());
}
} // namespace xrpl
} // namespace ripple
#endif // XRPL_BASICS_SHAMAP_HASH_H_INCLUDED

View File

@@ -4,7 +4,7 @@
#include <memory>
#include <variant>
namespace xrpl {
namespace ripple {
/** A combination of a std::shared_ptr and a std::weak_pointer.
@@ -112,5 +112,5 @@ public:
private:
std::variant<std::shared_ptr<T>, std::weak_ptr<T>> combo_;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,7 +3,7 @@
#include <xrpl/basics/SharedWeakCachePointer.h>
namespace xrpl {
namespace ripple {
template <class T>
SharedWeakCachePointer<T>::SharedWeakCachePointer(
SharedWeakCachePointer const& rhs) = default;
@@ -169,5 +169,5 @@ SharedWeakCachePointer<T>::convertToWeak()
return false;
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -22,7 +22,7 @@
#include <sys/mman.h>
#endif
namespace xrpl {
namespace ripple {
template <typename Type>
class SlabAllocator
@@ -128,7 +128,7 @@ class SlabAllocator
{
XRPL_ASSERT(
own(ptr),
"xrpl::SlabAllocator::SlabBlock::deallocate : own input");
"ripple::SlabAllocator::SlabBlock::deallocate : own input");
std::lock_guard l(m_);
@@ -159,7 +159,7 @@ public:
@param count the number of items the slab allocator can allocate; note
that a count of 0 is valid and means that the allocator
is, effectively, disabled. This can be very useful in some
contexts (e.g. when mimimal memory usage is needed) and
contexts (e.g. when minimal memory usage is needed) and
allows for graceful failure.
*/
constexpr explicit SlabAllocator(
@@ -173,7 +173,7 @@ public:
{
XRPL_ASSERT(
(itemAlignment_ & (itemAlignment_ - 1)) == 0,
"xrpl::SlabAllocator::SlabAllocator : valid alignment");
"ripple::SlabAllocator::SlabAllocator : valid alignment");
}
SlabAllocator(SlabAllocator const& other) = delete;
@@ -285,7 +285,7 @@ public:
{
XRPL_ASSERT(
ptr,
"xrpl::SlabAllocator::SlabAllocator::deallocate : non-null "
"ripple::SlabAllocator::SlabAllocator::deallocate : non-null "
"input");
for (auto slab = slabs_.load(); slab != nullptr; slab = slab->next_)
@@ -419,6 +419,6 @@ public:
}
};
} // namespace xrpl
} // namespace ripple
#endif // XRPL_BASICS_SLABALLOCATOR_H_INCLUDED

View File

@@ -15,7 +15,7 @@
#include <type_traits>
#include <vector>
namespace xrpl {
namespace ripple {
/** An immutable linear range of bytes.
@@ -87,7 +87,7 @@ public:
{
XRPL_ASSERT(
i < size_,
"xrpl::Slice::operator[](std::size_t) const : valid input");
"ripple::Slice::operator[](std::size_t) const : valid input");
return data_[i];
}
@@ -243,6 +243,6 @@ makeSlice(std::basic_string<char, Traits, Alloc> const& s)
return Slice(s.data(), s.size());
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -12,7 +12,7 @@
#include <optional>
#include <string>
namespace xrpl {
namespace ripple {
/** Format arbitrary binary data as an SQLite "blob literal".
@@ -132,6 +132,6 @@ to_uint64(std::string const& s);
bool
isProperlyFormedTomlDomain(std::string_view domain);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -16,7 +16,7 @@
#include <type_traits>
#include <vector>
namespace xrpl {
namespace ripple {
/** Map/cache combination.
This class implements a cache and a map. The cache keeps objects alive
@@ -315,6 +315,6 @@ private:
std::uint64_t m_misses;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -4,7 +4,7 @@
#include <xrpl/basics/IntrusivePointer.ipp>
#include <xrpl/basics/TaggedCache.h>
namespace xrpl {
namespace ripple {
template <
class Key,
@@ -1005,6 +1005,6 @@ TaggedCache<
});
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -4,7 +4,7 @@
#include <string>
#include <type_traits>
namespace xrpl {
namespace ripple {
/** to_string() generalizes std::to_string to handle bools, chars, and strings.
@@ -43,6 +43,6 @@ to_string(char const* s)
return s;
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -22,7 +22,7 @@
* what container it is.
*/
namespace xrpl {
namespace ripple {
// hash containers
@@ -102,6 +102,6 @@ template <
using hardened_hash_multiset =
std::unordered_multiset<Value, Hash, Pred, Allocator>;
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <ratio>
#include <thread>
namespace xrpl {
namespace ripple {
/** Tracks program uptime to seconds precision.
@@ -45,6 +45,6 @@ private:
start_clock();
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,7 +3,7 @@
#include <utility>
namespace xrpl {
namespace ripple {
// Requires: [first1, last1) and [first2, last2) are ordered ranges according to
// comp.
@@ -95,6 +95,6 @@ remove_if_intersect_or_match(
return first1;
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -38,7 +38,7 @@
#include <cstdint>
#include <string>
namespace xrpl {
namespace ripple {
std::string
base64_encode(std::uint8_t const* data, std::size_t len);
@@ -53,6 +53,6 @@ base64_encode(std::string const& s)
std::string
base64_decode(std::string_view data);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -23,7 +23,7 @@
#include <cstring>
#include <type_traits>
namespace xrpl {
namespace ripple {
namespace detail {
@@ -275,7 +275,7 @@ public:
{
XRPL_ASSERT(
c.size() * sizeof(typename Container::value_type) == size(),
"xrpl::base_uint::base_uint(Container auto) : input size match");
"ripple::base_uint::base_uint(Container auto) : input size match");
std::memcpy(data_.data(), c.data(), size());
}
@@ -288,7 +288,7 @@ public:
{
XRPL_ASSERT(
c.size() * sizeof(typename Container::value_type) == size(),
"xrpl::base_uint::operator=(Container auto) : input size match");
"ripple::base_uint::operator=(Container auto) : input size match");
std::memcpy(data_.data(), c.data(), size());
return *this;
}
@@ -546,7 +546,7 @@ operator<=>(base_uint<Bits, Tag> const& lhs, base_uint<Bits, Tag> const& rhs)
// This comparison might seem wrong on a casual inspection because it
// compares data internally stored as std::uint32_t byte-by-byte. But
// note that the underlying data is stored in big endian, even if the
// plaform is little endian. This makes the comparison correct.
// platform is little endian. This makes the comparison correct.
//
// FIXME: use std::lexicographical_compare_three_way once support is
// added to MacOS.
@@ -648,12 +648,12 @@ static_assert(sizeof(uint192) == 192 / 8, "There should be no padding bytes");
static_assert(sizeof(uint256) == 256 / 8, "There should be no padding bytes");
#endif
} // namespace xrpl
} // namespace ripple
namespace beast {
template <std::size_t Bits, class Tag>
struct is_uniquely_represented<xrpl::base_uint<Bits, Tag>>
struct is_uniquely_represented<ripple::base_uint<Bits, Tag>>
: public std::true_type
{
explicit is_uniquely_represented() = default;

View File

@@ -12,7 +12,7 @@
#include <ratio>
#include <string>
namespace xrpl {
namespace ripple {
// A few handy aliases
@@ -104,6 +104,6 @@ stopwatch()
return beast::get_abstract_clock<Facade, Clock>();
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,13 +3,13 @@
#include <functional>
namespace xrpl {
namespace ripple {
#ifdef _MSC_VER
/*
* MSVC 2019 version 16.9.0 added [[nodiscard]] to the std comparison
* operator() functions. boost::bimap checks that the comparitor is a
* operator() functions. boost::bimap checks that the comparator is a
* BinaryFunction, in part by calling the function and ignoring the value.
* These two things don't play well together. These wrapper classes simply
* strip [[nodiscard]] from operator() for use in boost::bimap.
@@ -52,6 +52,6 @@ using equal_to = std::equal_to<T>;
#endif
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -7,7 +7,7 @@
#include <string>
#include <utility>
namespace xrpl {
namespace ripple {
/* Programming By Contract
@@ -52,6 +52,6 @@ Throw(Args&&... args)
[[noreturn]] void
LogicError(std::string const& how) noexcept;
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -9,7 +9,7 @@
#include <random>
#include <utility>
namespace xrpl {
namespace ripple {
namespace detail {
@@ -92,6 +92,6 @@ public:
}
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,7 +3,7 @@
#include <string>
namespace xrpl {
namespace ripple {
template <class Stream, class Iter>
Stream&
@@ -85,6 +85,6 @@ public:
}
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -5,7 +5,7 @@
#include <string>
namespace xrpl {
namespace ripple {
/** Create a self-signed SSL context that allows anonymous Diffie Hellman. */
std::shared_ptr<boost::asio::ssl::context>
@@ -19,6 +19,6 @@ make_SSLContextAuthed(
std::string const& chainFile,
std::string const& cipherList);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -5,7 +5,7 @@
#include <limits>
#include <optional>
namespace xrpl {
namespace ripple {
auto constexpr muldiv_max = std::numeric_limits<std::uint64_t>::max();
/** Return value*mul/div accurately.
@@ -21,6 +21,6 @@ auto constexpr muldiv_max = std::numeric_limits<std::uint64_t>::max();
std::optional<std::uint64_t>
mulDiv(std::uint64_t value, std::uint64_t mul, std::uint64_t div);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -12,7 +12,7 @@
#include <utility>
#include <vector>
namespace xrpl {
namespace ripple {
template <typename Key>
static std::size_t
@@ -242,7 +242,7 @@ public:
map_.resize(partitions_);
XRPL_ASSERT(
partitions_,
"xrpl::partitioned_unordered_map::partitioned_unordered_map : "
"ripple::partitioned_unordered_map::partitioned_unordered_map : "
"nonzero partitions");
}
@@ -401,6 +401,6 @@ private:
mutable partition_map_type map_{};
};
} // namespace xrpl
} // namespace ripple
#endif // XRPL_BASICS_PARTITIONED_UNORDERED_MAP_H

View File

@@ -11,7 +11,7 @@
#include <random>
#include <type_traits>
namespace xrpl {
namespace ripple {
#ifndef __INTELLISENSE__
static_assert(
@@ -95,7 +95,7 @@ std::enable_if_t<
Integral>
rand_int(Engine& engine, Integral min, Integral max)
{
XRPL_ASSERT(max > min, "xrpl::rand_int : max over min inputs");
XRPL_ASSERT(max > min, "ripple::rand_int : max over min inputs");
// This should have no state and constructing it should
// be very cheap. If that turns out not to be the case
@@ -186,6 +186,6 @@ rand_bool()
}
/** @} */
} // namespace xrpl
} // namespace ripple
#endif // XRPL_BASICS_RANDOM_H_INCLUDED

View File

@@ -3,7 +3,7 @@
#include <type_traits>
namespace xrpl {
namespace ripple {
// safe_cast adds compile-time checks to a static_cast to ensure that
// the destination can hold all values of the source. This is particularly
@@ -80,6 +80,6 @@ inline constexpr std::
return unsafe_cast<Dest>(static_cast<std::underlying_type_t<Src>>(s));
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -8,7 +8,7 @@
#include <type_traits>
#include <utility>
namespace xrpl {
namespace ripple {
// RAII scope helpers. As specified in Library Fundamental, Version 3
// Basic design of idea: https://www.youtube.com/watch?v=WjTrfoiB0MQ
@@ -218,7 +218,7 @@ public:
{
XRPL_ASSERT(
plock->owns_lock(),
"xrpl::scope_unlock::scope_unlock : mutex must be locked");
"ripple::scope_unlock::scope_unlock : mutex must be locked");
plock->unlock();
}
@@ -236,6 +236,6 @@ public:
template <class Mutex>
scope_unlock(std::unique_lock<Mutex>&) -> scope_unlock<Mutex>;
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -13,7 +13,7 @@
#include <immintrin.h>
#endif
namespace xrpl {
namespace ripple {
namespace detail {
/** Inform the processor that we are in a tight spin-wait loop.
@@ -105,7 +105,7 @@ public:
{
XRPL_ASSERT(
index >= 0 && (mask_ != 0),
"xrpl::packed_spinlock::packed_spinlock : valid index and mask");
"ripple::packed_spinlock::packed_spinlock : valid index and mask");
}
[[nodiscard]] bool
@@ -206,6 +206,6 @@ public:
};
/** @} */
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -4,7 +4,7 @@
#include <boost/algorithm/hex.hpp>
#include <boost/endian/conversion.hpp>
namespace xrpl {
namespace ripple {
template <class FwdIt>
std::string
@@ -28,6 +28,6 @@ strHex(T const& from)
return strHex(from.begin(), from.end());
}
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -10,7 +10,7 @@
#include <iostream>
#include <type_traits>
namespace xrpl {
namespace ripple {
/** A type-safe wrap around standard integral types
@@ -197,11 +197,11 @@ public:
}
};
} // namespace xrpl
} // namespace ripple
namespace beast {
template <class Int, class Tag, class HashAlgorithm>
struct is_contiguously_hashable<xrpl::tagged_integer<Int, Tag>, HashAlgorithm>
struct is_contiguously_hashable<ripple::tagged_integer<Int, Tag>, HashAlgorithm>
: public is_contiguously_hashable<Int, HashAlgorithm>
{
explicit is_contiguously_hashable() = default;

View File

@@ -39,7 +39,7 @@ public:
The argument string is available to suites and
allows for customization of the test. Each suite
defines its own syntax for the argumnet string.
defines its own syntax for the argument string.
The same argument is passed to all suites.
*/
void

View File

@@ -4,7 +4,7 @@
#include <string>
#include <vector>
namespace xrpl {
namespace ripple {
class RFC1751
{
@@ -42,6 +42,6 @@ private:
static char const* s_dictionary[];
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,7 +3,7 @@
#include <mutex>
namespace xrpl {
namespace ripple {
/** A cryptographically secure random number engine
@@ -70,6 +70,6 @@ public:
csprng_engine&
crypto_prng();
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,7 +3,7 @@
#include <cstddef>
namespace xrpl {
namespace ripple {
/** Attempts to clear the given blob of memory.
@@ -22,6 +22,6 @@ namespace xrpl {
void
secure_erase(void* dest, std::size_t bytes);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -4,7 +4,7 @@
#include <xrpl/beast/utility/PropertyStream.h>
#include <xrpl/json/json_value.h>
namespace xrpl {
namespace ripple {
/** A PropertyStream::Sink which produces a Json::Value of type objectValue. */
class JsonPropertyStream : public beast::PropertyStream
@@ -66,6 +66,6 @@ protected:
add(std::string const& v) override;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -234,7 +234,7 @@ inline void
check(bool condition, std::string const& message)
{
if (!condition)
xrpl::Throw<std::logic_error>(message);
ripple::Throw<std::logic_error>(message);
}
} // namespace Json

View File

@@ -6,6 +6,6 @@
#define JSON_ASSERT_MESSAGE(condition, message) \
if (!(condition)) \
xrpl::Throw<Json::error>(message);
ripple::Throw<Json::error>(message);
#endif

View File

@@ -199,7 +199,7 @@ public:
Value(UInt value);
Value(double value);
Value(char const* value);
Value(xrpl::Number const& value);
Value(ripple::Number const& value);
/** \brief Constructs a value from a static string.
* Like other value string constructor but do not duplicate the string for
@@ -427,7 +427,7 @@ private:
};
inline Value
to_json(xrpl::Number const& number)
to_json(ripple::Number const& number)
{
return to_string(number);
}

View File

@@ -6,7 +6,7 @@
#include <xrpl/ledger/RawView.h>
#include <xrpl/ledger/ReadView.h>
namespace xrpl {
namespace ripple {
enum ApplyFlags : std::uint32_t {
tapNONE = 0x00,
@@ -267,7 +267,7 @@ public:
{
// LCOV_EXCL_START
UNREACHABLE(
"xrpl::ApplyView::dirAppend : only Offers are appended to "
"ripple::ApplyView::dirAppend : only Offers are appended to "
"book directories");
// Only Offers are appended to book directories. Call dirInsert()
// instead
@@ -368,6 +368,6 @@ public:
emptyDirDelete(Keylet const& directory);
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <xrpl/protocol/STAmount.h>
#include <xrpl/protocol/TER.h>
namespace xrpl {
namespace ripple {
/** Editable, discardable view that can build metadata for one tx.
@@ -75,6 +75,6 @@ private:
std::optional<STAmount> deliver_;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -4,7 +4,7 @@
#include <xrpl/beast/utility/Journal.h>
#include <xrpl/ledger/ReadView.h>
namespace xrpl {
namespace ripple {
class BookDirs
{
@@ -89,6 +89,6 @@ private:
static beast::Journal j_;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -5,7 +5,7 @@
#include <xrpl/basics/base_uint.h>
#include <xrpl/protocol/STLedgerEntry.h>
namespace xrpl {
namespace ripple {
using CachedSLEs = TaggedCache<uint256, SLE const>;
}

View File

@@ -8,7 +8,7 @@
#include <mutex>
#include <type_traits>
namespace xrpl {
namespace ripple {
namespace detail {
@@ -164,6 +164,6 @@ public:
}
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -11,7 +11,7 @@
#include <xrpl/protocol/STTx.h>
#include <xrpl/protocol/TER.h>
namespace xrpl {
namespace ripple {
namespace credentials {
// These function will be used by the code that use DepositPreauth / Credentials
@@ -93,6 +93,6 @@ verifyDepositPreauth(
std::shared_ptr<SLE> const& sleDst,
beast::Journal j);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -4,7 +4,7 @@
#include <xrpl/ledger/ReadView.h>
#include <xrpl/protocol/Indexes.h>
namespace xrpl {
namespace ripple {
/** A class that simplifies iterating ledger directory pages
@@ -108,6 +108,6 @@ private:
std::vector<uint256>::const_iterator it_;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -13,7 +13,7 @@
#include <functional>
#include <utility>
namespace xrpl {
namespace ripple {
/** Open ledger construction tag.
@@ -252,6 +252,6 @@ public:
std::shared_ptr<Serializer const> const& metaData) override;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -8,7 +8,7 @@
#include <map>
namespace xrpl {
namespace ripple {
namespace detail {
@@ -188,6 +188,6 @@ private:
PaymentSandbox const* ps_ = nullptr;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -5,7 +5,7 @@
#include <xrpl/protocol/STLedgerEntry.h>
#include <xrpl/protocol/Serializer.h>
namespace xrpl {
namespace ripple {
/** Interface for ledger entry changes.
@@ -87,6 +87,6 @@ public:
std::shared_ptr<Serializer const> const& metaData) = 0;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -18,7 +18,7 @@
#include <optional>
#include <unordered_set>
namespace xrpl {
namespace ripple {
//------------------------------------------------------------------------------
@@ -258,7 +258,7 @@ makeRulesGivenLedger(
DigestAwareReadView const& ledger,
std::unordered_set<uint256, beast::uhash<>> const& presets);
} // namespace xrpl
} // namespace ripple
#include <xrpl/ledger/detail/ReadViewFwdRange.ipp>

View File

@@ -4,7 +4,7 @@
#include <xrpl/ledger/RawView.h>
#include <xrpl/ledger/detail/ApplyViewBase.h>
namespace xrpl {
namespace ripple {
/** Discardable, editable view to a ledger.
@@ -39,6 +39,6 @@ public:
}
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -19,7 +19,7 @@
#include <map>
#include <utility>
namespace xrpl {
namespace ripple {
enum class WaiveTransferFee : bool { No = false, Yes };
enum class SkipEntry : bool { No = false, Yes };
@@ -958,6 +958,6 @@ sharesToAssetsWithdraw(
bool
after(NetClock::time_point now, std::uint32_t mark);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -11,7 +11,7 @@
#include <memory>
namespace xrpl {
namespace ripple {
namespace detail {
// Helper class that buffers modifications
@@ -139,6 +139,6 @@ private:
};
} // namespace detail
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -6,7 +6,7 @@
#include <xrpl/ledger/detail/ApplyStateTable.h>
#include <xrpl/protocol/XRPAmount.h>
namespace xrpl {
namespace ripple {
namespace detail {
class ApplyViewBase : public ApplyView, public RawView
@@ -106,6 +106,6 @@ protected:
};
} // namespace detail
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -10,7 +10,7 @@
#include <map>
#include <utility>
namespace xrpl {
namespace ripple {
namespace detail {
// Helper class that buffers raw modifications
@@ -118,6 +118,6 @@ private:
};
} // namespace detail
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -5,7 +5,7 @@
#include <memory>
#include <optional>
namespace xrpl {
namespace ripple {
class ReadView;
@@ -130,6 +130,6 @@ protected:
};
} // namespace detail
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -1,7 +1,7 @@
#ifndef XRPL_LEDGER_READVIEWFWDRANGEINL_H_INCLUDED
#define XRPL_LEDGER_READVIEWFWDRANGEINL_H_INCLUDED
namespace xrpl {
namespace ripple {
namespace detail {
template <class ValueType>
@@ -63,7 +63,7 @@ ReadViewFwdRange<ValueType>::iterator::operator==(iterator const& other) const
{
XRPL_ASSERT(
view_ == other.view_,
"xrpl::detail::ReadViewFwdRange::iterator::operator==(iterator) "
"ripple::detail::ReadViewFwdRange::iterator::operator==(iterator) "
"const : input view match");
if (impl_ != nullptr && other.impl_ != nullptr)
@@ -115,6 +115,6 @@ ReadViewFwdRange<ValueType>::iterator::operator++(int) -> iterator
}
} // namespace detail
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -269,7 +269,7 @@ protected:
error_code const& ec,
size_t bytesTransferred)
{
using namespace xrpl;
using namespace ripple;
if (ec)
{

View File

@@ -12,7 +12,7 @@
#include <functional>
#include <string>
namespace xrpl {
namespace ripple {
/** Provides an asynchronous HTTP client implementation with optional SSL.
*/
@@ -75,6 +75,6 @@ public:
beast::Journal& j);
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -11,7 +11,7 @@
#include <boost/asio/ssl.hpp>
#include <boost/format.hpp>
namespace xrpl {
namespace ripple {
class HTTPClientSSLContext
{
@@ -176,6 +176,6 @@ private:
bool const verify_;
};
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -5,7 +5,7 @@
#include <boost/asio/ssl/context.hpp>
namespace xrpl {
namespace ripple {
/** Register default SSL certificates.
Register the system default SSL root certificates. On linux/mac,
@@ -19,6 +19,6 @@ registerSSLCerts(
boost::system::error_code&,
beast::Journal j);
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -5,7 +5,7 @@
#include <cstdint>
namespace xrpl {
namespace ripple {
namespace NodeStore {
/** A backend used for the NodeStore.
@@ -143,6 +143,6 @@ public:
};
} // namespace NodeStore
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -11,7 +11,7 @@
#include <condition_variable>
namespace xrpl {
namespace ripple {
namespace NodeStore {
@@ -230,7 +230,7 @@ protected:
{
XRPL_ASSERT(
count <= sz,
"xrpl::NodeStore::Database::storeStats : valid inputs");
"ripple::NodeStore::Database::storeStats : valid inputs");
storeCount_ += count;
storeSz_ += sz;
}
@@ -291,6 +291,6 @@ private:
};
} // namespace NodeStore
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,7 +3,7 @@
#include <xrpl/nodestore/Database.h>
namespace xrpl {
namespace ripple {
namespace NodeStore {
/* This class has two key-value store Backend objects for persisting SHAMap
@@ -39,6 +39,6 @@ public:
};
} // namespace NodeStore
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -3,7 +3,7 @@
#include <xrpl/nodestore/Scheduler.h>
namespace xrpl {
namespace ripple {
namespace NodeStore {
/** Simple NodeStore Scheduler that just peforms the tasks synchronously. */
@@ -21,6 +21,6 @@ public:
};
} // namespace NodeStore
} // namespace xrpl
} // namespace ripple
#endif

View File

@@ -8,7 +8,7 @@
#include <nudb/store.hpp>
namespace xrpl {
namespace ripple {
namespace NodeStore {
@@ -61,6 +61,6 @@ public:
};
} // namespace NodeStore
} // namespace xrpl
} // namespace ripple
#endif

Some files were not shown because too many files have changed in this diff Show More