mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 23:45:51 +00:00
Compare commits
145 Commits
a1q123456/
...
Bronek/vau
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d908e459ac | ||
|
|
1494ae38e1 | ||
|
|
8f9524b5af | ||
|
|
676ed9ad04 | ||
|
|
f6a9b4f5b1 | ||
|
|
2737249500 | ||
|
|
591437b914 | ||
|
|
af8ea3fb40 | ||
|
|
6f4e7e8e44 | ||
|
|
392e3846ed | ||
|
|
85e7d293ca | ||
|
|
dbbf6829b9 | ||
|
|
5f53e4d1f8 | ||
|
|
fa0b021fb8 | ||
|
|
09833abd46 | ||
|
|
dc249b8b6d | ||
|
|
ad6e048ab2 | ||
|
|
2b86a1a557 | ||
|
|
93bd26547f | ||
|
|
b6c74303c1 | ||
|
|
a1c21a06bc | ||
|
|
b67d8e676b | ||
|
|
83582b6731 | ||
|
|
124512eba9 | ||
|
|
1807b441ee | ||
|
|
d3c1d02c72 | ||
|
|
f77ad36283 | ||
|
|
aff08b7543 | ||
|
|
696cf2b563 | ||
|
|
abaf213336 | ||
|
|
0f99955ae9 | ||
|
|
7686c3d88d | ||
|
|
33660eadc6 | ||
|
|
0636d4695d | ||
|
|
b6d7ef6c02 | ||
|
|
2e13dc1e85 | ||
|
|
dee06df012 | ||
|
|
f5042df72b | ||
|
|
d16e0518fd | ||
|
|
3883bafd52 | ||
|
|
275e02f190 | ||
|
|
afaa6aec8b | ||
|
|
05ebd0d8a6 | ||
|
|
372555bda8 | ||
|
|
2f06b344a7 | ||
|
|
fbe28f6536 | ||
|
|
ae68a09b06 | ||
|
|
dd3edbd5b0 | ||
|
|
a173dd20e2 | ||
|
|
cc4f87729f | ||
|
|
1e565e8488 | ||
|
|
9c1a0aad7d | ||
|
|
d8880ddb48 | ||
|
|
1f005d2370 | ||
|
|
0959bf82b7 | ||
|
|
58f15307ba | ||
|
|
3d2102106c | ||
|
|
4c7119b92f | ||
|
|
6b1cf7cee7 | ||
|
|
9a7def38b5 | ||
|
|
b1fc3b7c41 | ||
|
|
4e862e0afd | ||
|
|
403ef0d6c2 | ||
|
|
6db2144912 | ||
|
|
d77fc57c6a | ||
|
|
1df3ff8d76 | ||
|
|
8e68838543 | ||
|
|
2a8861d1c5 | ||
|
|
df8761d9f3 | ||
|
|
7b5680f536 | ||
|
|
b397524d85 | ||
|
|
e0932635ed | ||
|
|
238db87b7d | ||
|
|
840a4644c2 | ||
|
|
4c586eb4b0 | ||
|
|
3715d7e2e4 | ||
|
|
90fef02164 | ||
|
|
7b4e901dd7 | ||
|
|
8ca6a62b84 | ||
|
|
65fdac09b3 | ||
|
|
1441c919ad | ||
|
|
b0c2b97663 | ||
|
|
1589498ae1 | ||
|
|
4dc2025378 | ||
|
|
fc2e1a2b5a | ||
|
|
1756fa7d08 | ||
|
|
ac6d26a8b3 | ||
|
|
152da6e078 | ||
|
|
6370448299 | ||
|
|
04503c9fa4 | ||
|
|
a0632a0cb3 | ||
|
|
3f5df80b47 | ||
|
|
9d619b9dc5 | ||
|
|
e9ed80026e | ||
|
|
c1d8bc4928 | ||
|
|
87d8881c81 | ||
|
|
b7c9577230 | ||
|
|
ffaa8bd24b | ||
|
|
acaed58d85 | ||
|
|
1884ec5e60 | ||
|
|
6765c101a8 | ||
|
|
9decc053e3 | ||
|
|
8baadd5ec3 | ||
|
|
d1c7d1ae0f | ||
|
|
c3f9a4c6ff | ||
|
|
eed18d16ce | ||
|
|
21e0e7e97b | ||
|
|
a98e59a29a | ||
|
|
06a8a61b23 | ||
|
|
ad68074d72 | ||
|
|
3eebdae3f0 | ||
|
|
02dec4f797 | ||
|
|
65d6c48b4a | ||
|
|
86d249a5bb | ||
|
|
9bf9a1ef12 | ||
|
|
2c4a2244e9 | ||
|
|
25a20adf39 | ||
|
|
c08f86d473 | ||
|
|
580a85f2c8 | ||
|
|
dbaa12aa1c | ||
|
|
c325b6c7f5 | ||
|
|
375614d7ec | ||
|
|
bf8bbffab1 | ||
|
|
8d5cfb910a | ||
|
|
241429ba32 | ||
|
|
b9f1200652 | ||
|
|
526f715f16 | ||
|
|
eae2cd3328 | ||
|
|
ecec6e5d33 | ||
|
|
ad581661e3 | ||
|
|
b5619fbcd6 | ||
|
|
54d511b0db | ||
|
|
12646cb89e | ||
|
|
ea30f44247 | ||
|
|
ea6c040f10 | ||
|
|
1ff1274ee5 | ||
|
|
12552162c9 | ||
|
|
6046fa239c | ||
|
|
286612cf19 | ||
|
|
ebc97aee25 | ||
|
|
1680477e39 | ||
|
|
d09e74e548 | ||
|
|
a8ec8e7eaa | ||
|
|
ff8c6491d7 | ||
|
|
1a032f04e3 |
@@ -94,4 +94,3 @@ SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
QualifierAlignment: Right
|
||||
@@ -7,13 +7,13 @@ comment:
|
||||
show_carryforward_flags: false
|
||||
|
||||
coverage:
|
||||
range: "70..85"
|
||||
range: "60..80"
|
||||
precision: 1
|
||||
round: nearest
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
target: 75%
|
||||
target: 60%
|
||||
threshold: 2%
|
||||
patch:
|
||||
default:
|
||||
|
||||
8
.github/CODEOWNERS
vendored
8
.github/CODEOWNERS
vendored
@@ -1,8 +0,0 @@
|
||||
# Allow anyone to review any change by default.
|
||||
*
|
||||
|
||||
# Require the rpc-reviewers team to review changes to the rpc code.
|
||||
include/xrpl/protocol/ @xrplf/rpc-reviewers
|
||||
src/libxrpl/protocol/ @xrplf/rpc-reviewers
|
||||
src/xrpld/rpc/ @xrplf/rpc-reviewers
|
||||
src/xrpld/app/misc/ @xrplf/rpc-reviewers
|
||||
6
.github/workflows/clang-format.yml
vendored
6
.github/workflows/clang-format.yml
vendored
@@ -1,13 +1,9 @@
|
||||
name: clang-format
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, ready_for_review]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
CLANG_VERSION: 18
|
||||
|
||||
4
.github/workflows/doxygen.yml
vendored
4
.github/workflows/doxygen.yml
vendored
@@ -10,11 +10,11 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
documentation:
|
||||
job:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
||||
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
6
.github/workflows/levelization.yml
vendored
6
.github/workflows/levelization.yml
vendored
@@ -1,13 +1,9 @@
|
||||
name: levelization
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, ready_for_review]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CLANG_VERSION: 10
|
||||
|
||||
6
.github/workflows/libxrpl.yml
vendored
6
.github/workflows/libxrpl.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Check libXRPL compatibility with Clio
|
||||
env:
|
||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/dev
|
||||
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
||||
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
||||
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
||||
on:
|
||||
@@ -8,21 +8,19 @@ on:
|
||||
paths:
|
||||
- 'src/libxrpl/protocol/BuildInfo.cpp'
|
||||
- '.github/workflows/libxrpl.yml'
|
||||
types: [opened, reopened, synchronize, ready_for_review]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||
name: Publish libXRPL
|
||||
outputs:
|
||||
outcome: ${{ steps.upload.outputs.outcome }}
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
channel: ${{ steps.channel.outputs.channel }}
|
||||
runs-on: [self-hosted, heavy]
|
||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
||||
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||
steps:
|
||||
- name: Wait for essential checks to succeed
|
||||
uses: lewagon/wait-on-check-action@v1.3.4
|
||||
|
||||
10
.github/workflows/macos.yml
vendored
10
.github/workflows/macos.yml
vendored
@@ -1,7 +1,6 @@
|
||||
name: macos
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, ready_for_review]
|
||||
push:
|
||||
# If the branches list is ever changed, be sure to change it on all
|
||||
# build/test jobs (nix, macos, windows, instrumentation)
|
||||
@@ -19,7 +18,6 @@ concurrency:
|
||||
jobs:
|
||||
|
||||
test:
|
||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||
strategy:
|
||||
matrix:
|
||||
platform:
|
||||
@@ -71,9 +69,6 @@ jobs:
|
||||
nproc --version
|
||||
echo -n "nproc returns: "
|
||||
nproc
|
||||
system_profiler SPHardwareDataType
|
||||
sysctl -n hw.logicalcpu
|
||||
clang --version
|
||||
- name: configure Conan
|
||||
run : |
|
||||
conan profile new default --detect || true
|
||||
@@ -96,7 +91,4 @@ jobs:
|
||||
run: |
|
||||
n=$(nproc)
|
||||
echo "Using $n test jobs"
|
||||
|
||||
cd ${build_dir}
|
||||
./rippled --unittest --unittest-jobs $n
|
||||
ctest -j $n --output-on-failure
|
||||
${build_dir}/rippled --unittest --unittest-jobs $n
|
||||
|
||||
25
.github/workflows/nix.yml
vendored
25
.github/workflows/nix.yml
vendored
@@ -1,7 +1,6 @@
|
||||
name: nix
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, ready_for_review]
|
||||
push:
|
||||
# If the branches list is ever changed, be sure to change it on all
|
||||
# build/test jobs (nix, macos, windows)
|
||||
@@ -40,7 +39,6 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
dependencies:
|
||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -64,7 +62,7 @@ jobs:
|
||||
cc: /usr/bin/clang-14
|
||||
cxx: /usr/bin/clang++-14
|
||||
runs-on: [self-hosted, heavy]
|
||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
||||
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||
env:
|
||||
build_dir: .build
|
||||
steps:
|
||||
@@ -126,7 +124,7 @@ jobs:
|
||||
- "-Dunity=ON"
|
||||
needs: dependencies
|
||||
runs-on: [self-hosted, heavy]
|
||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
||||
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||
env:
|
||||
build_dir: .build
|
||||
steps:
|
||||
@@ -163,9 +161,7 @@ jobs:
|
||||
cmake-args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.cmake-args }}"
|
||||
- name: test
|
||||
run: |
|
||||
cd ${build_dir}
|
||||
./rippled --unittest --unittest-jobs $(nproc)
|
||||
ctest -j $(nproc) --output-on-failure
|
||||
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
||||
|
||||
reference-fee-test:
|
||||
strategy:
|
||||
@@ -182,7 +178,7 @@ jobs:
|
||||
- "-DUNIT_TEST_REFERENCE_FEE=1000"
|
||||
needs: dependencies
|
||||
runs-on: [self-hosted, heavy]
|
||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
||||
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||
env:
|
||||
build_dir: .build
|
||||
steps:
|
||||
@@ -219,9 +215,8 @@ jobs:
|
||||
cmake-args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.cmake-args }}"
|
||||
- name: test
|
||||
run: |
|
||||
cd ${build_dir}
|
||||
./rippled --unittest --unittest-jobs $(nproc)
|
||||
ctest -j $(nproc) --output-on-failure
|
||||
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
||||
|
||||
coverage:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -234,7 +229,7 @@ jobs:
|
||||
- Debug
|
||||
needs: dependencies
|
||||
runs-on: [self-hosted, heavy]
|
||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
||||
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||
env:
|
||||
build_dir: .build
|
||||
steps:
|
||||
@@ -250,7 +245,7 @@ jobs:
|
||||
mkdir -p ~/.conan
|
||||
tar -xzf conan.tar -C ~/.conan
|
||||
- name: install gcovr
|
||||
run: pip install "gcovr>=7,<9"
|
||||
run: pip install "gcovr>=7,<8"
|
||||
- name: check environment
|
||||
run: |
|
||||
echo ${PATH} | tr ':' '\n'
|
||||
@@ -308,7 +303,7 @@ jobs:
|
||||
conan:
|
||||
needs: dependencies
|
||||
runs-on: [self-hosted, heavy]
|
||||
container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e
|
||||
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||
env:
|
||||
build_dir: .build
|
||||
configuration: Release
|
||||
@@ -363,7 +358,6 @@ jobs:
|
||||
# later
|
||||
|
||||
instrumentation-build:
|
||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||
env:
|
||||
CLANG_RELEASE: 16
|
||||
strategy:
|
||||
@@ -444,4 +438,3 @@ jobs:
|
||||
run: |
|
||||
cd ${BUILD_DIR}
|
||||
./rippled -u --unittest-jobs $(( $(nproc)/4 ))
|
||||
ctest -j $(nproc) --output-on-failure
|
||||
|
||||
7
.github/workflows/windows.yml
vendored
7
.github/workflows/windows.yml
vendored
@@ -2,7 +2,6 @@ name: windows
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, ready_for_review]
|
||||
push:
|
||||
# If the branches list is ever changed, be sure to change it on all
|
||||
# build/test jobs (nix, macos, windows, instrumentation)
|
||||
@@ -22,7 +21,6 @@ concurrency:
|
||||
jobs:
|
||||
|
||||
test:
|
||||
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -95,6 +93,5 @@ jobs:
|
||||
shell: bash
|
||||
if: ${{ matrix.configuration.tests }}
|
||||
run: |
|
||||
cd ${build_dir}/${{ matrix.configuration.type }}
|
||||
./rippled --unittest --unittest-jobs $(nproc)
|
||||
ctest -j $(nproc) --output-on-failure
|
||||
${build_dir}/${{ matrix.configuration.type }}/rippled --unittest \
|
||||
--unittest-jobs $(nproc)
|
||||
|
||||
@@ -83,17 +83,9 @@ The [commandline](https://xrpl.org/docs/references/http-websocket-apis/api-conve
|
||||
|
||||
The `network_id` field was added in the `server_info` response in version 1.5.0 (2019), but it is not returned in [reporting mode](https://xrpl.org/rippled-server-modes.html#reporting-mode). However, use of reporting mode is now discouraged, in favor of using [Clio](https://github.com/XRPLF/clio) instead.
|
||||
|
||||
## XRP Ledger server version 2.5.0
|
||||
|
||||
As of 2025-04-04, version 2.5.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu).
|
||||
|
||||
### Additions and bugfixes in 2.5.0
|
||||
|
||||
- `channel_authorize`: If `signing_support` is not enabled in the config, the RPC is disabled.
|
||||
|
||||
## XRP Ledger server version 2.4.0
|
||||
|
||||
[Version 2.4.0](https://github.com/XRPLF/rippled/releases/tag/2.4.0) was released on March 4, 2025.
|
||||
As of 2025-01-28, version 2.4.0 is in development. You can use a pre-release version by building from source or [using the `nightly` package](https://xrpl.org/docs/infrastructure/installation/install-rippled-on-ubuntu).
|
||||
|
||||
### Additions and bugfixes in 2.4.0
|
||||
|
||||
|
||||
2
BUILD.md
2
BUILD.md
@@ -288,7 +288,7 @@ It fixes some source files to add missing `#include`s.
|
||||
Single-config generators:
|
||||
|
||||
```
|
||||
cmake --build . -j $(nproc)
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
Multi-config generators:
|
||||
|
||||
@@ -132,7 +132,6 @@ test.shamap > xrpl.protocol
|
||||
test.toplevel > test.csf
|
||||
test.toplevel > xrpl.json
|
||||
test.unit_test > xrpl.basics
|
||||
tests.libxrpl > xrpl.basics
|
||||
xrpl.json > xrpl.basics
|
||||
xrpl.protocol > xrpl.basics
|
||||
xrpl.protocol > xrpl.json
|
||||
|
||||
@@ -90,11 +90,6 @@ set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
INTERFACE_COMPILE_DEFINITIONS OPENSSL_NO_SSL2
|
||||
)
|
||||
set(SECP256K1_INSTALL TRUE)
|
||||
set(SECP256K1_BUILD_BENCHMARK FALSE)
|
||||
set(SECP256K1_BUILD_TESTS FALSE)
|
||||
set(SECP256K1_BUILD_EXHAUSTIVE_TESTS FALSE)
|
||||
set(SECP256K1_BUILD_CTIME_TESTS FALSE)
|
||||
set(SECP256K1_BUILD_EXAMPLES FALSE)
|
||||
add_subdirectory(external/secp256k1)
|
||||
add_library(secp256k1::secp256k1 ALIAS secp256k1)
|
||||
add_subdirectory(external/ed25519-donna)
|
||||
@@ -149,8 +144,3 @@ set(PROJECT_EXPORT_SET RippleExports)
|
||||
include(RippledCore)
|
||||
include(RippledInstall)
|
||||
include(RippledValidatorKeys)
|
||||
|
||||
if(tests)
|
||||
include(CTest)
|
||||
add_subdirectory(src/tests/libxrpl)
|
||||
endif()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
[](https://codecov.io/gh/XRPLF/rippled)
|
||||
|
||||
# The XRP Ledger
|
||||
|
||||
The [XRP Ledger](https://xrpl.org/) is a decentralized cryptographic ledger powered by a network of peer-to-peer nodes. The XRP Ledger uses a novel Byzantine Fault Tolerant consensus algorithm to settle and record transactions in a secure distributed database without a central operator.
|
||||
|
||||
4817
RELEASENOTES.md
Normal file
4817
RELEASENOTES.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -83,7 +83,7 @@ To report a qualifying bug, please send a detailed report to:
|
||||
|Long Key ID | `0xCD49A0AFC57929BE` |
|
||||
|Fingerprint | `24E6 3B02 37E0 FA9C 5E96 8974 CD49 A0AF C579 29BE` |
|
||||
|
||||
The full PGP key for this address, which is also available on several key servers (e.g. on [keyserver.ubuntu.com](https://keyserver.ubuntu.com)), is:
|
||||
The full PGP key for this address, which is also available on several key servers (e.g. on [keys.gnupg.net](https://keys.gnupg.net)), is:
|
||||
```
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
mQINBFUwGHYBEAC0wpGpBPkd8W1UdQjg9+cEFzeIEJRaoZoeuJD8mofwI5Ejnjdt
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#
|
||||
# Examples:
|
||||
# https://vl.ripple.com
|
||||
# https://unl.xrplf.org
|
||||
# https://vl.xrplf.org
|
||||
# http://127.0.0.1:8000
|
||||
# file:///etc/opt/ripple/vl.txt
|
||||
#
|
||||
|
||||
@@ -98,9 +98,6 @@
|
||||
# 2024-04-03, Bronek Kozicki
|
||||
# - add support for output formats: jacoco, clover, lcov
|
||||
#
|
||||
# 2025-05-12, Jingchen Wu
|
||||
# - add -fprofile-update=atomic to ensure atomic profile generation
|
||||
#
|
||||
# USAGE:
|
||||
#
|
||||
# 1. Copy this file into your cmake modules path.
|
||||
@@ -203,27 +200,15 @@ set(COVERAGE_COMPILER_FLAGS "-g --coverage"
|
||||
CACHE INTERNAL "")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
check_cxx_compiler_flag(-fprofile-abs-path HAVE_cxx_fprofile_abs_path)
|
||||
if(HAVE_cxx_fprofile_abs_path)
|
||||
set(COVERAGE_CXX_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
|
||||
endif()
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
check_c_compiler_flag(-fprofile-abs-path HAVE_c_fprofile_abs_path)
|
||||
if(HAVE_c_fprofile_abs_path)
|
||||
set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-abs-path")
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag(-fprofile-update HAVE_cxx_fprofile_update)
|
||||
if(HAVE_cxx_fprofile_update)
|
||||
set(COVERAGE_CXX_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-update=atomic")
|
||||
endif()
|
||||
|
||||
check_c_compiler_flag(-fprofile-update HAVE_c_fprofile_update)
|
||||
if(HAVE_c_fprofile_update)
|
||||
set(COVERAGE_C_COMPILER_FLAGS "${COVERAGE_COMPILER_FLAGS} -fprofile-update=atomic")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_Fortran_FLAGS_COVERAGE
|
||||
|
||||
@@ -53,9 +53,9 @@ set(download_script "${CMAKE_BINARY_DIR}/docs/download-cppreference.cmake")
|
||||
file(WRITE
|
||||
"${download_script}"
|
||||
"file(DOWNLOAD \
|
||||
https://github.com/PeterFeicht/cppreference-doc/releases/download/v20250209/html-book-20250209.zip \
|
||||
http://upload.cppreference.com/mwiki/images/b/b2/html_book_20190607.zip \
|
||||
${CMAKE_BINARY_DIR}/docs/cppreference.zip \
|
||||
EXPECTED_HASH MD5=bda585f72fbca4b817b29a3d5746567b \
|
||||
EXPECTED_HASH MD5=82b3a612d7d35a83e3cb1195a63689ab \
|
||||
)\n \
|
||||
execute_process( \
|
||||
COMMAND \"${CMAKE_COMMAND}\" -E tar -xf cppreference.zip \
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
convenience variables and sanity checks
|
||||
#]===================================================================]
|
||||
|
||||
include(ProcessorCount)
|
||||
|
||||
if (NOT ep_procs)
|
||||
ProcessorCount(ep_procs)
|
||||
if (ep_procs GREATER 1)
|
||||
# never use more than half of cores for EP builds
|
||||
math (EXPR ep_procs "${ep_procs} / 2")
|
||||
message (STATUS "Using ${ep_procs} cores for ExternalProject builds.")
|
||||
endif ()
|
||||
endif ()
|
||||
get_property(is_multiconfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
||||
set (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
||||
|
||||
@@ -18,7 +18,7 @@ if(tests)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(unity "Creates a build using UNITY support in cmake." OFF)
|
||||
option(unity "Creates a build using UNITY support in cmake. This is the default" ON)
|
||||
if(unity)
|
||||
if(NOT is_ci)
|
||||
set(CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "")
|
||||
|
||||
@@ -2,6 +2,7 @@ find_package(Boost 1.82 REQUIRED
|
||||
COMPONENTS
|
||||
chrono
|
||||
container
|
||||
context
|
||||
coroutine
|
||||
date_time
|
||||
filesystem
|
||||
@@ -23,7 +24,7 @@ endif()
|
||||
|
||||
target_link_libraries(ripple_boost
|
||||
INTERFACE
|
||||
Boost::headers
|
||||
Boost::boost
|
||||
Boost::chrono
|
||||
Boost::container
|
||||
Boost::coroutine
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
include(isolate_headers)
|
||||
|
||||
function(xrpl_add_test name)
|
||||
set(target ${PROJECT_NAME}.test.${name})
|
||||
|
||||
file(GLOB_RECURSE sources CONFIGURE_DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${name}/*.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${name}.cpp"
|
||||
)
|
||||
add_executable(${target} EXCLUDE_FROM_ALL ${ARGN} ${sources})
|
||||
|
||||
isolate_headers(
|
||||
${target}
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
"${CMAKE_SOURCE_DIR}/tests/${name}"
|
||||
PRIVATE
|
||||
)
|
||||
|
||||
# Make sure the test isn't optimized away in unity builds
|
||||
set_target_properties(${target} PROPERTIES
|
||||
UNITY_BUILD_MODE GROUP
|
||||
UNITY_BUILD_BATCH_SIZE 0) # Adjust as needed
|
||||
|
||||
add_test(NAME ${target} COMMAND ${target})
|
||||
set_tests_properties(
|
||||
${target} PROPERTIES
|
||||
FIXTURES_REQUIRED ${target}_fixture
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME ${target}.build
|
||||
COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
--build ${CMAKE_BINARY_DIR}
|
||||
--config $<CONFIG>
|
||||
--target ${target}
|
||||
)
|
||||
set_tests_properties(${target}.build PROPERTIES
|
||||
FIXTURES_SETUP ${target}_fixture
|
||||
)
|
||||
endfunction()
|
||||
23
conanfile.py
23
conanfile.py
@@ -1,4 +1,4 @@
|
||||
from conan import ConanFile, __version__ as conan_version
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
||||
import re
|
||||
|
||||
@@ -24,12 +24,13 @@ class Xrpl(ConanFile):
|
||||
}
|
||||
|
||||
requires = [
|
||||
'doctest/2.4.11',
|
||||
'date/3.0.3',
|
||||
'grpc/1.50.1',
|
||||
'libarchive/3.7.6',
|
||||
'nudb/2.0.8',
|
||||
'openssl/1.1.1v',
|
||||
'soci/4.0.3',
|
||||
'xxhash/0.8.2',
|
||||
'zlib/1.3.1',
|
||||
]
|
||||
|
||||
@@ -98,10 +99,7 @@ class Xrpl(ConanFile):
|
||||
self.options['boost'].visibility = 'global'
|
||||
|
||||
def requirements(self):
|
||||
# Conan 2 requires transitive headers to be specified
|
||||
transitive_headers_opt = {'transitive_headers': True} if conan_version.split('.')[0] == '2' else {}
|
||||
self.requires('boost/1.83.0', force=True, **transitive_headers_opt)
|
||||
self.requires('date/3.0.3', **transitive_headers_opt)
|
||||
self.requires('boost/1.83.0', force=True)
|
||||
self.requires('lz4/1.10.0', force=True)
|
||||
self.requires('protobuf/3.21.9', force=True)
|
||||
self.requires('sqlite3/3.47.0', force=True)
|
||||
@@ -109,7 +107,6 @@ class Xrpl(ConanFile):
|
||||
self.requires('jemalloc/5.3.0')
|
||||
if self.options.rocksdb:
|
||||
self.requires('rocksdb/9.7.3')
|
||||
self.requires('xxhash/0.8.2', **transitive_headers_opt)
|
||||
|
||||
exports_sources = (
|
||||
'CMakeLists.txt',
|
||||
@@ -164,17 +161,7 @@ class Xrpl(ConanFile):
|
||||
# `include/`, not `include/ripple/proto/`.
|
||||
libxrpl.includedirs = ['include', 'include/ripple/proto']
|
||||
libxrpl.requires = [
|
||||
'boost::headers',
|
||||
'boost::chrono',
|
||||
'boost::container',
|
||||
'boost::coroutine',
|
||||
'boost::date_time',
|
||||
'boost::filesystem',
|
||||
'boost::json',
|
||||
'boost::program_options',
|
||||
'boost::regex',
|
||||
'boost::system',
|
||||
'boost::thread',
|
||||
'boost::boost',
|
||||
'date::date',
|
||||
'grpc::grpc++',
|
||||
'libarchive::libarchive',
|
||||
|
||||
5
docs/build/environment.md
vendored
5
docs/build/environment.md
vendored
@@ -23,7 +23,7 @@ direction.
|
||||
|
||||
```
|
||||
apt update
|
||||
apt install --yes curl git libssl-dev pipx python3.10-dev python3-pip make g++-11 libprotobuf-dev protobuf-compiler
|
||||
apt install --yes curl git libssl-dev python3.10-dev python3-pip make g++-11 libprotobuf-dev protobuf-compiler
|
||||
|
||||
curl --location --remote-name \
|
||||
"https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1.tar.gz"
|
||||
@@ -35,8 +35,7 @@ make --jobs $(nproc)
|
||||
make install
|
||||
cd ..
|
||||
|
||||
pipx install 'conan<2'
|
||||
pipx ensurepath
|
||||
pip3 install 'conan<2'
|
||||
```
|
||||
|
||||
[1]: https://github.com/thejohnfreeman/rippled-docker/blob/master/ubuntu-22.04/install.sh
|
||||
|
||||
2
external/antithesis-sdk/CMakeLists.txt
vendored
2
external/antithesis-sdk/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
|
||||
# Note, version set explicitly by rippled project
|
||||
project(antithesis-sdk-cpp VERSION 0.4.4 LANGUAGES CXX)
|
||||
|
||||
@@ -367,7 +367,7 @@ get(Section const& section,
|
||||
}
|
||||
|
||||
inline std::string
|
||||
get(Section const& section, std::string const& name, char const* defaultValue)
|
||||
get(Section const& section, std::string const& name, const char* defaultValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ lz4Compress(void const* in, std::size_t inSize, BufferFactory&& bf)
|
||||
auto compressed = bf(outCapacity);
|
||||
|
||||
auto compressedSize = LZ4_compress_default(
|
||||
reinterpret_cast<char const*>(in),
|
||||
reinterpret_cast<const char*>(in),
|
||||
reinterpret_cast<char*>(compressed),
|
||||
inSize,
|
||||
outCapacity);
|
||||
@@ -89,7 +89,7 @@ lz4Decompress(
|
||||
Throw<std::runtime_error>("lz4Decompress: integer overflow (output)");
|
||||
|
||||
if (LZ4_decompress_safe(
|
||||
reinterpret_cast<char const*>(in),
|
||||
reinterpret_cast<const char*>(in),
|
||||
reinterpret_cast<char*>(decompressed),
|
||||
inSize,
|
||||
decompressedSize) != decompressedSize)
|
||||
|
||||
@@ -22,18 +22,8 @@
|
||||
|
||||
#include <xrpl/basics/contract.h>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#include <boost/outcome.hpp>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace ripple {
|
||||
@@ -103,7 +93,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
constexpr E const&
|
||||
constexpr const E&
|
||||
value() const&
|
||||
{
|
||||
return val_;
|
||||
@@ -121,7 +111,7 @@ public:
|
||||
return std::move(val_);
|
||||
}
|
||||
|
||||
constexpr E const&&
|
||||
constexpr const E&&
|
||||
value() const&&
|
||||
{
|
||||
return std::move(val_);
|
||||
|
||||
@@ -294,7 +294,7 @@ IntrusiveRefCounts::releaseStrongRef() const
|
||||
}
|
||||
|
||||
if (refCounts.compare_exchange_weak(
|
||||
prevIntVal, nextIntVal, std::memory_order_acq_rel))
|
||||
prevIntVal, nextIntVal, std::memory_order_release))
|
||||
{
|
||||
// Can't be in partial destroy because only decrementing the strong
|
||||
// count to zero can start a partial destroy, and that can't happen
|
||||
@@ -351,7 +351,7 @@ IntrusiveRefCounts::addWeakReleaseStrongRef() const
|
||||
}
|
||||
}
|
||||
if (refCounts.compare_exchange_weak(
|
||||
prevIntVal, nextIntVal, std::memory_order_acq_rel))
|
||||
prevIntVal, nextIntVal, std::memory_order_release))
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
(!(prevIntVal & partialDestroyStartedMask)),
|
||||
@@ -374,7 +374,7 @@ IntrusiveRefCounts::releaseWeakRef() const
|
||||
// This case should only be hit if the partialDestroyStartedBit is
|
||||
// set non-atomically (and even then very rarely). The code is kept
|
||||
// in case we need to set the flag non-atomically for perf reasons.
|
||||
refCounts.wait(prevIntVal, std::memory_order_acquire);
|
||||
refCounts.wait(prevIntVal, std::memory_order_acq_rel);
|
||||
prevIntVal = refCounts.load(std::memory_order_acquire);
|
||||
prev = RefCountPair{prevIntVal};
|
||||
}
|
||||
@@ -382,7 +382,7 @@ IntrusiveRefCounts::releaseWeakRef() const
|
||||
{
|
||||
// partial destroy MUST finish before running a full destroy (when
|
||||
// using weak pointers)
|
||||
refCounts.wait(prevIntVal - weakDelta, std::memory_order_acquire);
|
||||
refCounts.wait(prevIntVal - weakDelta, std::memory_order_acq_rel);
|
||||
}
|
||||
return ReleaseWeakRefAction::destroy;
|
||||
}
|
||||
@@ -396,7 +396,7 @@ IntrusiveRefCounts::checkoutStrongRefFromWeak() const noexcept
|
||||
auto desiredValue = RefCountPair{2, 1}.combinedValue();
|
||||
|
||||
while (!refCounts.compare_exchange_weak(
|
||||
curValue, desiredValue, std::memory_order_acq_rel))
|
||||
curValue, desiredValue, std::memory_order_release))
|
||||
{
|
||||
RefCountPair const prev{curValue};
|
||||
if (!prev.strong)
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
sweep();
|
||||
|
||||
bool
|
||||
del(key_type const& key, bool valid);
|
||||
del(const key_type& key, bool valid);
|
||||
|
||||
public:
|
||||
/** Replace aliased objects with originals.
|
||||
@@ -134,20 +134,20 @@ public:
|
||||
template <class R>
|
||||
bool
|
||||
canonicalize(
|
||||
key_type const& key,
|
||||
const key_type& key,
|
||||
SharedPointerType& data,
|
||||
R&& replaceCallback);
|
||||
|
||||
bool
|
||||
canonicalize_replace_cache(
|
||||
key_type const& key,
|
||||
const key_type& key,
|
||||
SharedPointerType const& data);
|
||||
|
||||
bool
|
||||
canonicalize_replace_client(key_type const& key, SharedPointerType& data);
|
||||
canonicalize_replace_client(const key_type& key, SharedPointerType& data);
|
||||
|
||||
SharedPointerType
|
||||
fetch(key_type const& key);
|
||||
fetch(const key_type& key);
|
||||
|
||||
/** Insert the element into the container.
|
||||
If the key already exists, nothing happens.
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
// simply return an iterator.
|
||||
//
|
||||
bool
|
||||
retrieve(key_type const& key, T& data);
|
||||
retrieve(const key_type& key, T& data);
|
||||
|
||||
mutex_type&
|
||||
peekMutex();
|
||||
@@ -322,10 +322,10 @@ private:
|
||||
std::string m_name;
|
||||
|
||||
// Desired number of cache entries (0 = ignore)
|
||||
int const m_target_size;
|
||||
const int m_target_size;
|
||||
|
||||
// Desired maximum cache age
|
||||
clock_type::duration const m_target_age;
|
||||
const clock_type::duration m_target_age;
|
||||
|
||||
// Number of items cached
|
||||
int m_cache_count;
|
||||
|
||||
@@ -365,7 +365,7 @@ TaggedCache<
|
||||
SharedPointerType,
|
||||
Hash,
|
||||
KeyEqual,
|
||||
Mutex>::del(key_type const& key, bool valid)
|
||||
Mutex>::del(const key_type& key, bool valid)
|
||||
{
|
||||
// Remove from cache, if !valid, remove from map too. Returns true if
|
||||
// removed from cache
|
||||
@@ -414,7 +414,7 @@ TaggedCache<
|
||||
KeyEqual,
|
||||
Mutex>::
|
||||
canonicalize(
|
||||
key_type const& key,
|
||||
const key_type& key,
|
||||
SharedPointerType& data,
|
||||
R&& replaceCallback)
|
||||
{
|
||||
@@ -509,7 +509,7 @@ TaggedCache<
|
||||
KeyEqual,
|
||||
Mutex>::
|
||||
canonicalize_replace_cache(
|
||||
key_type const& key,
|
||||
const key_type& key,
|
||||
SharedPointerType const& data)
|
||||
{
|
||||
return canonicalize(
|
||||
@@ -535,7 +535,7 @@ TaggedCache<
|
||||
Hash,
|
||||
KeyEqual,
|
||||
Mutex>::
|
||||
canonicalize_replace_client(key_type const& key, SharedPointerType& data)
|
||||
canonicalize_replace_client(const key_type& key, SharedPointerType& data)
|
||||
{
|
||||
return canonicalize(key, data, []() { return false; });
|
||||
}
|
||||
@@ -558,7 +558,7 @@ TaggedCache<
|
||||
SharedPointerType,
|
||||
Hash,
|
||||
KeyEqual,
|
||||
Mutex>::fetch(key_type const& key)
|
||||
Mutex>::fetch(const key_type& key)
|
||||
{
|
||||
std::lock_guard<mutex_type> l(m_mutex);
|
||||
auto ret = initialFetch(key, l);
|
||||
@@ -656,7 +656,7 @@ TaggedCache<
|
||||
SharedPointerType,
|
||||
Hash,
|
||||
KeyEqual,
|
||||
Mutex>::retrieve(key_type const& key, T& data)
|
||||
Mutex>::retrieve(const key_type& key, T& data)
|
||||
{
|
||||
// retrieve the value of the stored data
|
||||
auto entry = fetch(key);
|
||||
|
||||
@@ -374,7 +374,7 @@ public:
|
||||
}
|
||||
|
||||
base_uint&
|
||||
operator^=(base_uint const& b)
|
||||
operator^=(const base_uint& b)
|
||||
{
|
||||
for (int i = 0; i < WIDTH; i++)
|
||||
data_[i] ^= b.data_[i];
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
}
|
||||
|
||||
base_uint&
|
||||
operator&=(base_uint const& b)
|
||||
operator&=(const base_uint& b)
|
||||
{
|
||||
for (int i = 0; i < WIDTH; i++)
|
||||
data_[i] &= b.data_[i];
|
||||
@@ -392,7 +392,7 @@ public:
|
||||
}
|
||||
|
||||
base_uint&
|
||||
operator|=(base_uint const& b)
|
||||
operator|=(const base_uint& b)
|
||||
{
|
||||
for (int i = 0; i < WIDTH; i++)
|
||||
data_[i] |= b.data_[i];
|
||||
@@ -415,11 +415,11 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
base_uint const
|
||||
const base_uint
|
||||
operator++(int)
|
||||
{
|
||||
// postfix operator
|
||||
base_uint const ret = *this;
|
||||
const base_uint ret = *this;
|
||||
++(*this);
|
||||
|
||||
return ret;
|
||||
@@ -441,11 +441,11 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
base_uint const
|
||||
const base_uint
|
||||
operator--(int)
|
||||
{
|
||||
// postfix operator
|
||||
base_uint const ret = *this;
|
||||
const base_uint ret = *this;
|
||||
--(*this);
|
||||
|
||||
return ret;
|
||||
@@ -466,7 +466,7 @@ public:
|
||||
}
|
||||
|
||||
base_uint&
|
||||
operator+=(base_uint const& b)
|
||||
operator+=(const base_uint& b)
|
||||
{
|
||||
std::uint64_t carry = 0;
|
||||
|
||||
@@ -511,7 +511,7 @@ public:
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr bool
|
||||
parseHex(char const* str)
|
||||
parseHex(const char* str)
|
||||
{
|
||||
return parseHex(std::string_view{str});
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ struct less
|
||||
using result_type = bool;
|
||||
|
||||
constexpr bool
|
||||
operator()(T const& left, T const& right) const
|
||||
operator()(const T& left, const T& right) const
|
||||
{
|
||||
return std::less<T>()(left, right);
|
||||
}
|
||||
@@ -55,7 +55,7 @@ struct equal_to
|
||||
using result_type = bool;
|
||||
|
||||
constexpr bool
|
||||
operator()(T const& left, T const& right) const
|
||||
operator()(const T& left, const T& right) const
|
||||
{
|
||||
return std::equal_to<T>()(left, right);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ template <
|
||||
typename Value,
|
||||
typename Hash,
|
||||
typename Pred = std::equal_to<Key>,
|
||||
typename Alloc = std::allocator<std::pair<Key const, Value>>>
|
||||
typename Alloc = std::allocator<std::pair<const Key, Value>>>
|
||||
class partitioned_unordered_map
|
||||
{
|
||||
std::size_t partitions_;
|
||||
|
||||
@@ -76,13 +76,13 @@ public:
|
||||
}
|
||||
|
||||
bool
|
||||
operator<(tagged_integer const& rhs) const noexcept
|
||||
operator<(const tagged_integer& rhs) const noexcept
|
||||
{
|
||||
return m_value < rhs.m_value;
|
||||
}
|
||||
|
||||
bool
|
||||
operator==(tagged_integer const& rhs) const noexcept
|
||||
operator==(const tagged_integer& rhs) const noexcept
|
||||
{
|
||||
return m_value == rhs.m_value;
|
||||
}
|
||||
@@ -144,14 +144,14 @@ public:
|
||||
}
|
||||
|
||||
tagged_integer&
|
||||
operator<<=(tagged_integer const& rhs) noexcept
|
||||
operator<<=(const tagged_integer& rhs) noexcept
|
||||
{
|
||||
m_value <<= rhs.m_value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
tagged_integer&
|
||||
operator>>=(tagged_integer const& rhs) noexcept
|
||||
operator>>=(const tagged_integer& rhs) noexcept
|
||||
{
|
||||
m_value >>= rhs.m_value;
|
||||
return *this;
|
||||
|
||||
@@ -24,38 +24,13 @@
|
||||
#include <boost/container/flat_set.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
||||
/*
|
||||
|
||||
Workaround for overzealous clang warning, which trips on libstdc++ headers
|
||||
|
||||
In file included from
|
||||
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:61:
|
||||
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8:
|
||||
error: 'get_temporary_buffer<std::pair<ripple::Quality, const
|
||||
std::vector<std::unique_ptr<ripple::Step>> *>>' is deprecated
|
||||
[-Werror,-Wdeprecated-declarations] 263 |
|
||||
std::get_temporary_buffer<value_type>(_M_original_len));
|
||||
^
|
||||
*/
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace beast {
|
||||
template <class Hasher = xxhasher>
|
||||
struct uhash
|
||||
{
|
||||
uhash() = default;
|
||||
explicit uhash() = default;
|
||||
|
||||
using result_type = typename Hasher::result_type;
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ namespace std {
|
||||
template <>
|
||||
struct hash<::beast::IP::Endpoint>
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
|
||||
std::size_t
|
||||
operator()(::beast::IP::Endpoint const& endpoint) const
|
||||
@@ -230,7 +230,7 @@ namespace boost {
|
||||
template <>
|
||||
struct hash<::beast::IP::Endpoint>
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
|
||||
std::size_t
|
||||
operator()(::beast::IP::Endpoint const& endpoint) const
|
||||
|
||||
@@ -37,9 +37,9 @@ class temp_dir
|
||||
|
||||
public:
|
||||
#if !GENERATING_DOCS
|
||||
temp_dir(temp_dir const&) = delete;
|
||||
temp_dir(const temp_dir&) = delete;
|
||||
temp_dir&
|
||||
operator=(temp_dir const&) = delete;
|
||||
operator=(const temp_dir&) = delete;
|
||||
#endif
|
||||
|
||||
/// Construct a temporary directory.
|
||||
|
||||
@@ -39,7 +39,7 @@ class Reader
|
||||
{
|
||||
public:
|
||||
using Char = char;
|
||||
using Location = Char const*;
|
||||
using Location = const Char*;
|
||||
|
||||
/** \brief Constructs a Reader allowing all features
|
||||
* for parsing.
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
* error occurred.
|
||||
*/
|
||||
bool
|
||||
parse(char const* beginDoc, char const* endDoc, Value& root);
|
||||
parse(const char* beginDoc, const char* endDoc, Value& root);
|
||||
|
||||
/// \brief Parse from input stream.
|
||||
/// \see Json::operator>>(std::istream&, Json::Value&).
|
||||
@@ -133,7 +133,7 @@ private:
|
||||
using Errors = std::deque<ErrorInfo>;
|
||||
|
||||
bool
|
||||
expectToken(TokenType type, Token& token, char const* message);
|
||||
expectToken(TokenType type, Token& token, const char* message);
|
||||
bool
|
||||
readToken(Token& token);
|
||||
void
|
||||
|
||||
@@ -63,24 +63,24 @@ enum ValueType {
|
||||
class StaticString
|
||||
{
|
||||
public:
|
||||
constexpr explicit StaticString(char const* czstring) : str_(czstring)
|
||||
constexpr explicit StaticString(const char* czstring) : str_(czstring)
|
||||
{
|
||||
}
|
||||
|
||||
constexpr
|
||||
operator char const*() const
|
||||
operator const char*() const
|
||||
{
|
||||
return str_;
|
||||
}
|
||||
|
||||
constexpr char const*
|
||||
constexpr const char*
|
||||
c_str() const
|
||||
{
|
||||
return str_;
|
||||
}
|
||||
|
||||
private:
|
||||
char const* str_;
|
||||
const char* str_;
|
||||
};
|
||||
|
||||
inline bool
|
||||
@@ -158,10 +158,10 @@ public:
|
||||
using Int = Json::Int;
|
||||
using ArrayIndex = UInt;
|
||||
|
||||
static Value const null;
|
||||
static Int const minInt;
|
||||
static Int const maxInt;
|
||||
static UInt const maxUInt;
|
||||
static const Value null;
|
||||
static const Int minInt;
|
||||
static const Int maxInt;
|
||||
static const UInt maxUInt;
|
||||
|
||||
private:
|
||||
class CZString
|
||||
@@ -173,24 +173,24 @@ private:
|
||||
duplicateOnCopy
|
||||
};
|
||||
CZString(int index);
|
||||
CZString(char const* cstr, DuplicationPolicy allocate);
|
||||
CZString(CZString const& other);
|
||||
CZString(const char* cstr, DuplicationPolicy allocate);
|
||||
CZString(const CZString& other);
|
||||
~CZString();
|
||||
CZString&
|
||||
operator=(CZString const& other) = delete;
|
||||
operator=(const CZString& other) = delete;
|
||||
bool
|
||||
operator<(CZString const& other) const;
|
||||
operator<(const CZString& other) const;
|
||||
bool
|
||||
operator==(CZString const& other) const;
|
||||
operator==(const CZString& other) const;
|
||||
int
|
||||
index() const;
|
||||
char const*
|
||||
const char*
|
||||
c_str() const;
|
||||
bool
|
||||
isStaticString() const;
|
||||
|
||||
private:
|
||||
char const* cstr_;
|
||||
const char* cstr_;
|
||||
int index_;
|
||||
};
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
Value(Int value);
|
||||
Value(UInt value);
|
||||
Value(double value);
|
||||
Value(char const* value);
|
||||
Value(const char* value);
|
||||
Value(ripple::Number const& value);
|
||||
/** \brief Constructs a value from a static string.
|
||||
|
||||
@@ -230,10 +230,10 @@ public:
|
||||
* Json::Value aValue( StaticString("some text") );
|
||||
* \endcode
|
||||
*/
|
||||
Value(StaticString const& value);
|
||||
Value(const StaticString& value);
|
||||
Value(std::string const& value);
|
||||
Value(bool value);
|
||||
Value(Value const& other);
|
||||
Value(const Value& other);
|
||||
~Value();
|
||||
|
||||
Value&
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
ValueType
|
||||
type() const;
|
||||
|
||||
char const*
|
||||
const char*
|
||||
asCString() const;
|
||||
/** Returns the unquoted string value. */
|
||||
std::string
|
||||
@@ -320,12 +320,12 @@ public:
|
||||
/// Access an array element (zero based index )
|
||||
/// (You may need to say 'value[0u]' to get your compiler to distinguish
|
||||
/// this from the operator[] which takes a string.)
|
||||
Value const&
|
||||
const Value&
|
||||
operator[](UInt index) const;
|
||||
/// If the array contains at least index+1 elements, returns the element
|
||||
/// value, otherwise returns defaultValue.
|
||||
Value
|
||||
get(UInt index, Value const& defaultValue) const;
|
||||
get(UInt index, const Value& defaultValue) const;
|
||||
/// Return true if index < size().
|
||||
bool
|
||||
isValidIndex(UInt index) const;
|
||||
@@ -333,25 +333,25 @@ public:
|
||||
///
|
||||
/// Equivalent to jsonvalue[jsonvalue.size()] = value;
|
||||
Value&
|
||||
append(Value const& value);
|
||||
append(const Value& value);
|
||||
Value&
|
||||
append(Value&& value);
|
||||
|
||||
/// Access an object value by name, create a null member if it does not
|
||||
/// exist.
|
||||
Value&
|
||||
operator[](char const* key);
|
||||
operator[](const char* key);
|
||||
/// Access an object value by name, returns null if there is no member with
|
||||
/// that name.
|
||||
Value const&
|
||||
operator[](char const* key) const;
|
||||
const Value&
|
||||
operator[](const char* key) const;
|
||||
/// Access an object value by name, create a null member if it does not
|
||||
/// exist.
|
||||
Value&
|
||||
operator[](std::string const& key);
|
||||
/// Access an object value by name, returns null if there is no member with
|
||||
/// that name.
|
||||
Value const&
|
||||
const Value&
|
||||
operator[](std::string const& key) const;
|
||||
/** \brief Access an object value by name, create a null member if it does
|
||||
not exist.
|
||||
@@ -367,16 +367,16 @@ public:
|
||||
* \endcode
|
||||
*/
|
||||
Value&
|
||||
operator[](StaticString const& key);
|
||||
operator[](const StaticString& key);
|
||||
Value const&
|
||||
operator[](StaticString const& key) const;
|
||||
operator[](const StaticString& key) const;
|
||||
|
||||
/// Return the member named key if it exist, defaultValue otherwise.
|
||||
Value
|
||||
get(char const* key, Value const& defaultValue) const;
|
||||
get(const char* key, const Value& defaultValue) const;
|
||||
/// Return the member named key if it exist, defaultValue otherwise.
|
||||
Value
|
||||
get(std::string const& key, Value const& defaultValue) const;
|
||||
get(std::string const& key, const Value& defaultValue) const;
|
||||
|
||||
/// \brief Remove and return the named member.
|
||||
///
|
||||
@@ -385,14 +385,14 @@ public:
|
||||
/// \pre type() is objectValue or nullValue
|
||||
/// \post type() is unchanged
|
||||
Value
|
||||
removeMember(char const* key);
|
||||
removeMember(const char* key);
|
||||
/// Same as removeMember(const char*)
|
||||
Value
|
||||
removeMember(std::string const& key);
|
||||
|
||||
/// Return true if the object has a member named key.
|
||||
bool
|
||||
isMember(char const* key) const;
|
||||
isMember(const char* key) const;
|
||||
/// Return true if the object has a member named key.
|
||||
bool
|
||||
isMember(std::string const& key) const;
|
||||
@@ -419,13 +419,13 @@ public:
|
||||
end();
|
||||
|
||||
friend bool
|
||||
operator==(Value const&, Value const&);
|
||||
operator==(const Value&, const Value&);
|
||||
friend bool
|
||||
operator<(Value const&, Value const&);
|
||||
operator<(const Value&, const Value&);
|
||||
|
||||
private:
|
||||
Value&
|
||||
resolveReference(char const* key, bool isStatic);
|
||||
resolveReference(const char* key, bool isStatic);
|
||||
|
||||
private:
|
||||
union ValueHolder
|
||||
@@ -448,31 +448,31 @@ to_json(ripple::Number const& number)
|
||||
}
|
||||
|
||||
bool
|
||||
operator==(Value const&, Value const&);
|
||||
operator==(const Value&, const Value&);
|
||||
|
||||
inline bool
|
||||
operator!=(Value const& x, Value const& y)
|
||||
operator!=(const Value& x, const Value& y)
|
||||
{
|
||||
return !(x == y);
|
||||
}
|
||||
|
||||
bool
|
||||
operator<(Value const&, Value const&);
|
||||
operator<(const Value&, const Value&);
|
||||
|
||||
inline bool
|
||||
operator<=(Value const& x, Value const& y)
|
||||
operator<=(const Value& x, const Value& y)
|
||||
{
|
||||
return !(y < x);
|
||||
}
|
||||
|
||||
inline bool
|
||||
operator>(Value const& x, Value const& y)
|
||||
operator>(const Value& x, const Value& y)
|
||||
{
|
||||
return y < x;
|
||||
}
|
||||
|
||||
inline bool
|
||||
operator>=(Value const& x, Value const& y)
|
||||
operator>=(const Value& x, const Value& y)
|
||||
{
|
||||
return !(x < y);
|
||||
}
|
||||
@@ -493,11 +493,11 @@ public:
|
||||
virtual ~ValueAllocator() = default;
|
||||
|
||||
virtual char*
|
||||
makeMemberName(char const* memberName) = 0;
|
||||
makeMemberName(const char* memberName) = 0;
|
||||
virtual void
|
||||
releaseMemberName(char* memberName) = 0;
|
||||
virtual char*
|
||||
duplicateStringValue(char const* value, unsigned int length = unknown) = 0;
|
||||
duplicateStringValue(const char* value, unsigned int length = unknown) = 0;
|
||||
virtual void
|
||||
releaseStringValue(char* value) = 0;
|
||||
};
|
||||
@@ -514,16 +514,16 @@ public:
|
||||
|
||||
ValueIteratorBase();
|
||||
|
||||
explicit ValueIteratorBase(Value::ObjectValues::iterator const& current);
|
||||
explicit ValueIteratorBase(const Value::ObjectValues::iterator& current);
|
||||
|
||||
bool
|
||||
operator==(SelfType const& other) const
|
||||
operator==(const SelfType& other) const
|
||||
{
|
||||
return isEqual(other);
|
||||
}
|
||||
|
||||
bool
|
||||
operator!=(SelfType const& other) const
|
||||
operator!=(const SelfType& other) const
|
||||
{
|
||||
return !isEqual(other);
|
||||
}
|
||||
@@ -539,7 +539,7 @@ public:
|
||||
|
||||
/// Return the member name of the referenced Value. "" if it is not an
|
||||
/// objectValue.
|
||||
char const*
|
||||
const char*
|
||||
memberName() const;
|
||||
|
||||
protected:
|
||||
@@ -553,13 +553,13 @@ protected:
|
||||
decrement();
|
||||
|
||||
difference_type
|
||||
computeDistance(SelfType const& other) const;
|
||||
computeDistance(const SelfType& other) const;
|
||||
|
||||
bool
|
||||
isEqual(SelfType const& other) const;
|
||||
isEqual(const SelfType& other) const;
|
||||
|
||||
void
|
||||
copy(SelfType const& other);
|
||||
copy(const SelfType& other);
|
||||
|
||||
private:
|
||||
Value::ObjectValues::iterator current_;
|
||||
@@ -577,8 +577,8 @@ class ValueConstIterator : public ValueIteratorBase
|
||||
public:
|
||||
using size_t = unsigned int;
|
||||
using difference_type = int;
|
||||
using reference = Value const&;
|
||||
using pointer = Value const*;
|
||||
using reference = const Value&;
|
||||
using pointer = const Value*;
|
||||
using SelfType = ValueConstIterator;
|
||||
|
||||
ValueConstIterator() = default;
|
||||
@@ -586,11 +586,11 @@ public:
|
||||
private:
|
||||
/*! \internal Use by Value to create an iterator.
|
||||
*/
|
||||
explicit ValueConstIterator(Value::ObjectValues::iterator const& current);
|
||||
explicit ValueConstIterator(const Value::ObjectValues::iterator& current);
|
||||
|
||||
public:
|
||||
SelfType&
|
||||
operator=(ValueIteratorBase const& other);
|
||||
operator=(const ValueIteratorBase& other);
|
||||
|
||||
SelfType
|
||||
operator++(int)
|
||||
@@ -643,17 +643,17 @@ public:
|
||||
using SelfType = ValueIterator;
|
||||
|
||||
ValueIterator() = default;
|
||||
ValueIterator(ValueConstIterator const& other);
|
||||
ValueIterator(ValueIterator const& other);
|
||||
ValueIterator(const ValueConstIterator& other);
|
||||
ValueIterator(const ValueIterator& other);
|
||||
|
||||
private:
|
||||
/*! \internal Use by Value to create an iterator.
|
||||
*/
|
||||
explicit ValueIterator(Value::ObjectValues::iterator const& current);
|
||||
explicit ValueIterator(const Value::ObjectValues::iterator& current);
|
||||
|
||||
public:
|
||||
SelfType&
|
||||
operator=(SelfType const& other);
|
||||
operator=(const SelfType& other);
|
||||
|
||||
SelfType
|
||||
operator++(int)
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
{
|
||||
}
|
||||
virtual std::string
|
||||
write(Value const& root) = 0;
|
||||
write(const Value& root) = 0;
|
||||
};
|
||||
|
||||
/** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format
|
||||
@@ -60,11 +60,11 @@ public:
|
||||
|
||||
public: // overridden from Writer
|
||||
std::string
|
||||
write(Value const& root) override;
|
||||
write(const Value& root) override;
|
||||
|
||||
private:
|
||||
void
|
||||
writeValue(Value const& value);
|
||||
writeValue(const Value& value);
|
||||
|
||||
std::string document_;
|
||||
};
|
||||
@@ -101,15 +101,15 @@ public: // overridden from Writer
|
||||
* JSON document that represents the root value.
|
||||
*/
|
||||
std::string
|
||||
write(Value const& root) override;
|
||||
write(const Value& root) override;
|
||||
|
||||
private:
|
||||
void
|
||||
writeValue(Value const& value);
|
||||
writeValue(const Value& value);
|
||||
void
|
||||
writeArrayValue(Value const& value);
|
||||
writeArrayValue(const Value& value);
|
||||
bool
|
||||
isMultineArray(Value const& value);
|
||||
isMultineArray(const Value& value);
|
||||
void
|
||||
pushValue(std::string const& value);
|
||||
void
|
||||
@@ -168,15 +168,15 @@ public:
|
||||
* return a value.
|
||||
*/
|
||||
void
|
||||
write(std::ostream& out, Value const& root);
|
||||
write(std::ostream& out, const Value& root);
|
||||
|
||||
private:
|
||||
void
|
||||
writeValue(Value const& value);
|
||||
writeValue(const Value& value);
|
||||
void
|
||||
writeArrayValue(Value const& value);
|
||||
writeArrayValue(const Value& value);
|
||||
bool
|
||||
isMultineArray(Value const& value);
|
||||
isMultineArray(const Value& value);
|
||||
void
|
||||
pushValue(std::string const& value);
|
||||
void
|
||||
@@ -207,12 +207,12 @@ valueToString(double value);
|
||||
std::string
|
||||
valueToString(bool value);
|
||||
std::string
|
||||
valueToQuotedString(char const* value);
|
||||
valueToQuotedString(const char* value);
|
||||
|
||||
/// \brief Output using the StyledStreamWriter.
|
||||
/// \see Json::operator>>()
|
||||
std::ostream&
|
||||
operator<<(std::ostream&, Value const& root);
|
||||
operator<<(std::ostream&, const Value& root);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ pretty(Value const&);
|
||||
|
||||
/** Output using the StyledStreamWriter. @see Json::operator>>(). */
|
||||
std::ostream&
|
||||
operator<<(std::ostream&, Value const& root);
|
||||
operator<<(std::ostream&, const Value& root);
|
||||
|
||||
} // namespace Json
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace std {
|
||||
template <>
|
||||
struct hash<ripple::AccountID> : ripple::AccountID::hasher
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of rippled: https://github.com/ripple/rippled
|
||||
Copyright (c) 2024 Ripple Labs Inc.
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <xrpl/protocol/HashPrefix.h>
|
||||
#include <xrpl/protocol/STVector256.h>
|
||||
#include <xrpl/protocol/Serializer.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
inline void
|
||||
serializeBatch(
|
||||
Serializer& msg,
|
||||
std::uint32_t const& flags,
|
||||
std::vector<uint256> const& txids)
|
||||
{
|
||||
msg.add32(HashPrefix::batch);
|
||||
msg.add32(flags);
|
||||
msg.add32(std::uint32_t(txids.size()));
|
||||
for (auto const& txid : txids)
|
||||
msg.addBitString(txid);
|
||||
}
|
||||
|
||||
} // namespace ripple
|
||||
@@ -21,7 +21,6 @@
|
||||
#define RIPPLE_PROTOCOL_BOOK_H_INCLUDED
|
||||
|
||||
#include <xrpl/basics/CountedObject.h>
|
||||
#include <xrpl/basics/base_uint.h>
|
||||
#include <xrpl/protocol/Issue.h>
|
||||
|
||||
#include <boost/utility/base_from_member.hpp>
|
||||
@@ -37,17 +36,12 @@ class Book final : public CountedObject<Book>
|
||||
public:
|
||||
Issue in;
|
||||
Issue out;
|
||||
std::optional<uint256> domain;
|
||||
|
||||
Book()
|
||||
{
|
||||
}
|
||||
|
||||
Book(
|
||||
Issue const& in_,
|
||||
Issue const& out_,
|
||||
std::optional<uint256> const& domain_)
|
||||
: in(in_), out(out_), domain(domain_)
|
||||
Book(Issue const& in_, Issue const& out_) : in(in_), out(out_)
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -67,8 +61,6 @@ hash_append(Hasher& h, Book const& b)
|
||||
{
|
||||
using beast::hash_append;
|
||||
hash_append(h, b.in, b.out);
|
||||
if (b.domain)
|
||||
hash_append(h, *(b.domain));
|
||||
}
|
||||
|
||||
Book
|
||||
@@ -79,8 +71,7 @@ reversed(Book const& book);
|
||||
[[nodiscard]] inline constexpr bool
|
||||
operator==(Book const& lhs, Book const& rhs)
|
||||
{
|
||||
return (lhs.in == rhs.in) && (lhs.out == rhs.out) &&
|
||||
(lhs.domain == rhs.domain);
|
||||
return (lhs.in == rhs.in) && (lhs.out == rhs.out);
|
||||
}
|
||||
/** @} */
|
||||
|
||||
@@ -91,18 +82,7 @@ operator<=>(Book const& lhs, Book const& rhs)
|
||||
{
|
||||
if (auto const c{lhs.in <=> rhs.in}; c != 0)
|
||||
return c;
|
||||
if (auto const c{lhs.out <=> rhs.out}; c != 0)
|
||||
return c;
|
||||
|
||||
// Manually compare optionals
|
||||
if (lhs.domain && rhs.domain)
|
||||
return *lhs.domain <=> *rhs.domain; // Compare values if both exist
|
||||
if (!lhs.domain && rhs.domain)
|
||||
return std::weak_ordering::less; // Empty is considered less
|
||||
if (lhs.domain && !rhs.domain)
|
||||
return std::weak_ordering::greater; // Non-empty is greater
|
||||
|
||||
return std::weak_ordering::equivalent; // Both are empty
|
||||
return lhs.out <=> rhs.out;
|
||||
}
|
||||
/** @} */
|
||||
|
||||
@@ -124,7 +104,7 @@ private:
|
||||
boost::base_from_member<std::hash<ripple::AccountID>, 1>;
|
||||
|
||||
public:
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
|
||||
using value_type = std::size_t;
|
||||
using argument_type = ripple::Issue;
|
||||
@@ -146,14 +126,12 @@ template <>
|
||||
struct hash<ripple::Book>
|
||||
{
|
||||
private:
|
||||
using issue_hasher = std::hash<ripple::Issue>;
|
||||
using uint256_hasher = ripple::uint256::hasher;
|
||||
using hasher = std::hash<ripple::Issue>;
|
||||
|
||||
issue_hasher m_issue_hasher;
|
||||
uint256_hasher m_uint256_hasher;
|
||||
hasher m_hasher;
|
||||
|
||||
public:
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
|
||||
using value_type = std::size_t;
|
||||
using argument_type = ripple::Book;
|
||||
@@ -161,12 +139,8 @@ public:
|
||||
value_type
|
||||
operator()(argument_type const& value) const
|
||||
{
|
||||
value_type result(m_issue_hasher(value.in));
|
||||
boost::hash_combine(result, m_issue_hasher(value.out));
|
||||
|
||||
if (value.domain)
|
||||
boost::hash_combine(result, m_uint256_hasher(*value.domain));
|
||||
|
||||
value_type result(m_hasher(value.in));
|
||||
boost::hash_combine(result, m_hasher(value.out));
|
||||
return result;
|
||||
}
|
||||
};
|
||||
@@ -180,7 +154,7 @@ namespace boost {
|
||||
template <>
|
||||
struct hash<ripple::Issue> : std::hash<ripple::Issue>
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
|
||||
using Base = std::hash<ripple::Issue>;
|
||||
// VFALCO NOTE broken in vs2012
|
||||
@@ -190,7 +164,7 @@ struct hash<ripple::Issue> : std::hash<ripple::Issue>
|
||||
template <>
|
||||
struct hash<ripple::Book> : std::hash<ripple::Book>
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
|
||||
using Base = std::hash<ripple::Book>;
|
||||
// VFALCO NOTE broken in vs2012
|
||||
|
||||
@@ -120,7 +120,7 @@ enum error_code_i {
|
||||
rpcSRC_ACT_MALFORMED = 65,
|
||||
rpcSRC_ACT_MISSING = 66,
|
||||
rpcSRC_ACT_NOT_FOUND = 67,
|
||||
rpcDELEGATE_ACT_NOT_FOUND = 68,
|
||||
// unused 68,
|
||||
rpcSRC_CUR_MALFORMED = 69,
|
||||
rpcSRC_ISR_MALFORMED = 70,
|
||||
rpcSTREAM_MALFORMED = 71,
|
||||
@@ -154,10 +154,7 @@ enum error_code_i {
|
||||
// Simulate
|
||||
rpcTX_SIGNED = 96,
|
||||
|
||||
// Pathfinding
|
||||
rpcDOMAIN_MALFORMED = 97,
|
||||
|
||||
rpcLAST = rpcDOMAIN_MALFORMED // rpcLAST should always equal the last code.
|
||||
rpcLAST = rpcTX_SIGNED // rpcLAST should always equal the last code.
|
||||
};
|
||||
|
||||
/** Codes returned in the `warnings` array of certain RPC commands.
|
||||
|
||||
@@ -55,18 +55,6 @@
|
||||
* `VoteBehavior::DefaultYes`. The communication process is beyond
|
||||
* the scope of these instructions.
|
||||
*
|
||||
* 5) A feature marked as Obsolete can mean either:
|
||||
* 1) It is in the ledger (marked as Supported::yes) and it is on its way to
|
||||
* become Retired
|
||||
* 2) The feature is not in the ledger (has always been marked as
|
||||
* Supported::no) and the code to support it has been removed
|
||||
*
|
||||
* If we want to discontinue a feature that we've never fully supported and
|
||||
* the feature has never been enabled, we should remove all the related
|
||||
* code, and mark the feature as "abandoned". To do this:
|
||||
*
|
||||
* 1) Open features.macro, move the feature to the abandoned section and
|
||||
* change the macro to XRPL_ABANDON
|
||||
*
|
||||
* When a feature has been enabled for several years, the conditional code
|
||||
* may be removed, and the feature "retired". To retire a feature:
|
||||
@@ -100,13 +88,10 @@ namespace detail {
|
||||
#undef XRPL_FIX
|
||||
#pragma push_macro("XRPL_RETIRE")
|
||||
#undef XRPL_RETIRE
|
||||
#pragma push_macro("XRPL_ABANDON")
|
||||
#undef XRPL_ABANDON
|
||||
|
||||
#define XRPL_FEATURE(name, supported, vote) +1
|
||||
#define XRPL_FIX(name, supported, vote) +1
|
||||
#define XRPL_RETIRE(name) +1
|
||||
#define XRPL_ABANDON(name) +1
|
||||
|
||||
// This value SHOULD be equal to the number of amendments registered in
|
||||
// Feature.cpp. Because it's only used to reserve storage, and determine how
|
||||
@@ -123,8 +108,6 @@ static constexpr std::size_t numFeatures =
|
||||
#pragma pop_macro("XRPL_FIX")
|
||||
#undef XRPL_FEATURE
|
||||
#pragma pop_macro("XRPL_FEATURE")
|
||||
#undef XRPL_ABANDON
|
||||
#pragma pop_macro("XRPL_ABANDON")
|
||||
|
||||
/** Amendments that this server supports and the default voting behavior.
|
||||
Whether they are enabled depends on the Rules defined in the validated
|
||||
@@ -366,13 +349,10 @@ foreachFeature(FeatureBitset bs, F&& f)
|
||||
#undef XRPL_FIX
|
||||
#pragma push_macro("XRPL_RETIRE")
|
||||
#undef XRPL_RETIRE
|
||||
#pragma push_macro("XRPL_ABANDON")
|
||||
#undef XRPL_ABANDON
|
||||
|
||||
#define XRPL_FEATURE(name, supported, vote) extern uint256 const feature##name;
|
||||
#define XRPL_FIX(name, supported, vote) extern uint256 const fix##name;
|
||||
#define XRPL_RETIRE(name)
|
||||
#define XRPL_ABANDON(name)
|
||||
|
||||
#include <xrpl/protocol/detail/features.macro>
|
||||
|
||||
@@ -382,8 +362,6 @@ foreachFeature(FeatureBitset bs, F&& f)
|
||||
#pragma pop_macro("XRPL_FIX")
|
||||
#undef XRPL_FEATURE
|
||||
#pragma pop_macro("XRPL_FEATURE")
|
||||
#undef XRPL_ABANDON
|
||||
#pragma pop_macro("XRPL_ABANDON")
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
// Output Fees as just their numeric value.
|
||||
template <class Char, class Traits, class UnitTag, class T>
|
||||
std::basic_ostream<Char, Traits>&
|
||||
operator<<(std::basic_ostream<Char, Traits>& os, TaggedFee<UnitTag, T> const& q)
|
||||
operator<<(std::basic_ostream<Char, Traits>& os, const TaggedFee<UnitTag, T>& q)
|
||||
{
|
||||
return os << q.value();
|
||||
}
|
||||
|
||||
@@ -88,9 +88,6 @@ enum class HashPrefix : std::uint32_t {
|
||||
|
||||
/** Credentials signature */
|
||||
credential = detail::make_hash_prefix('C', 'R', 'D'),
|
||||
|
||||
/** Batch */
|
||||
batch = detail::make_hash_prefix('B', 'C', 'H'),
|
||||
};
|
||||
|
||||
template <class Hasher>
|
||||
|
||||
@@ -98,12 +98,6 @@ public:
|
||||
|
||||
static IOUAmount
|
||||
minPositiveAmount();
|
||||
|
||||
friend std::ostream&
|
||||
operator<<(std::ostream& os, IOUAmount const& x)
|
||||
{
|
||||
return os << to_string(x);
|
||||
}
|
||||
};
|
||||
|
||||
inline IOUAmount::IOUAmount(beast::Zero)
|
||||
|
||||
@@ -53,11 +53,11 @@ class SeqProxy;
|
||||
namespace keylet {
|
||||
|
||||
/** AccountID root */
|
||||
TypedKeylet<ltACCOUNT_ROOT>
|
||||
Keylet
|
||||
account(AccountID const& id) noexcept;
|
||||
|
||||
/** The index of the amendment table */
|
||||
TypedKeylet<ltAMENDMENTS> const&
|
||||
Keylet const&
|
||||
amendments() noexcept;
|
||||
|
||||
/** Any item that can be in an owner dir. */
|
||||
@@ -69,7 +69,7 @@ child(uint256 const& key) noexcept;
|
||||
The "short" skip list is a node (at a fixed index) that holds the hashes
|
||||
of ledgers since the last flag ledger. It will contain, at most, 256 hashes.
|
||||
*/
|
||||
TypedKeylet<ltLEDGER_HASHES> const&
|
||||
Keylet const&
|
||||
skip() noexcept;
|
||||
|
||||
/** The index of the long skip for a particular ledger range.
|
||||
@@ -82,15 +82,15 @@ skip() noexcept;
|
||||
and uses it to get the hash of the flag ledger whose short skip list will
|
||||
contain the hash of the requested ledger.
|
||||
*/
|
||||
TypedKeylet<ltLEDGER_HASHES>
|
||||
Keylet
|
||||
skip(LedgerIndex ledger) noexcept;
|
||||
|
||||
/** The (fixed) index of the object containing the ledger fees. */
|
||||
TypedKeylet<ltFEE_SETTINGS> const&
|
||||
Keylet const&
|
||||
fees() noexcept;
|
||||
|
||||
/** The (fixed) index of the object containing the ledger negativeUNL. */
|
||||
TypedKeylet<ltNEGATIVE_UNL> const&
|
||||
Keylet const&
|
||||
negativeUNL() noexcept;
|
||||
|
||||
/** The beginning of an order book */
|
||||
@@ -98,7 +98,7 @@ struct book_t
|
||||
{
|
||||
explicit book_t() = default;
|
||||
|
||||
TypedKeylet<ltDIR_NODE>
|
||||
Keylet
|
||||
operator()(Book const& b) const;
|
||||
};
|
||||
static book_t const book{};
|
||||
@@ -111,13 +111,13 @@ static book_t const book{};
|
||||
between them.
|
||||
*/
|
||||
/** @{ */
|
||||
TypedKeylet<ltRIPPLE_STATE>
|
||||
Keylet
|
||||
line(
|
||||
AccountID const& id0,
|
||||
AccountID const& id1,
|
||||
Currency const& currency) noexcept;
|
||||
|
||||
inline TypedKeylet<ltRIPPLE_STATE>
|
||||
inline Keylet
|
||||
line(AccountID const& id, Issue const& issue) noexcept
|
||||
{
|
||||
return line(id, issue.account, issue.currency);
|
||||
@@ -126,27 +126,27 @@ line(AccountID const& id, Issue const& issue) noexcept
|
||||
|
||||
/** An offer from an account */
|
||||
/** @{ */
|
||||
TypedKeylet<ltOFFER>
|
||||
Keylet
|
||||
offer(AccountID const& id, std::uint32_t seq) noexcept;
|
||||
|
||||
inline TypedKeylet<ltOFFER>
|
||||
inline Keylet
|
||||
offer(uint256 const& key) noexcept
|
||||
{
|
||||
return {key};
|
||||
return {ltOFFER, key};
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** The initial directory page for a specific quality */
|
||||
TypedKeylet<ltDIR_NODE>
|
||||
quality(TypedKeylet<ltDIR_NODE> const& k, std::uint64_t q) noexcept;
|
||||
Keylet
|
||||
quality(Keylet const& k, std::uint64_t q) noexcept;
|
||||
|
||||
/** The directory for the next lower quality */
|
||||
struct next_t
|
||||
{
|
||||
explicit next_t() = default;
|
||||
|
||||
TypedKeylet<ltDIR_NODE>
|
||||
operator()(TypedKeylet<ltDIR_NODE> const& k) const;
|
||||
Keylet
|
||||
operator()(Keylet const& k) const;
|
||||
};
|
||||
static next_t const next{};
|
||||
|
||||
@@ -155,50 +155,50 @@ struct ticket_t
|
||||
{
|
||||
explicit ticket_t() = default;
|
||||
|
||||
TypedKeylet<ltTICKET>
|
||||
Keylet
|
||||
operator()(AccountID const& id, std::uint32_t ticketSeq) const;
|
||||
|
||||
TypedKeylet<ltTICKET>
|
||||
Keylet
|
||||
operator()(AccountID const& id, SeqProxy ticketSeq) const;
|
||||
|
||||
TypedKeylet<ltTICKET>
|
||||
Keylet
|
||||
operator()(uint256 const& key) const
|
||||
{
|
||||
return {key};
|
||||
return {ltTICKET, key};
|
||||
}
|
||||
};
|
||||
static ticket_t const ticket{};
|
||||
|
||||
/** A SignerList */
|
||||
TypedKeylet<ltSIGNER_LIST>
|
||||
Keylet
|
||||
signers(AccountID const& account) noexcept;
|
||||
|
||||
/** A Check */
|
||||
/** @{ */
|
||||
TypedKeylet<ltCHECK>
|
||||
Keylet
|
||||
check(AccountID const& id, std::uint32_t seq) noexcept;
|
||||
|
||||
inline TypedKeylet<ltCHECK>
|
||||
inline Keylet
|
||||
check(uint256 const& key) noexcept
|
||||
{
|
||||
return {key};
|
||||
return {ltCHECK, key};
|
||||
}
|
||||
/** @} */
|
||||
|
||||
/** A DepositPreauth */
|
||||
/** @{ */
|
||||
TypedKeylet<ltDEPOSIT_PREAUTH>
|
||||
Keylet
|
||||
depositPreauth(AccountID const& owner, AccountID const& preauthorized) noexcept;
|
||||
|
||||
TypedKeylet<ltDEPOSIT_PREAUTH>
|
||||
Keylet
|
||||
depositPreauth(
|
||||
AccountID const& owner,
|
||||
std::set<std::pair<AccountID, Slice>> const& authCreds) noexcept;
|
||||
|
||||
inline TypedKeylet<ltDEPOSIT_PREAUTH>
|
||||
inline Keylet
|
||||
depositPreauth(uint256 const& key) noexcept
|
||||
{
|
||||
return {key};
|
||||
return {ltDEPOSIT_PREAUTH, key};
|
||||
}
|
||||
/** @} */
|
||||
|
||||
@@ -209,15 +209,15 @@ Keylet
|
||||
unchecked(uint256 const& key) noexcept;
|
||||
|
||||
/** The root page of an account's directory */
|
||||
TypedKeylet<ltDIR_NODE>
|
||||
Keylet
|
||||
ownerDir(AccountID const& id) noexcept;
|
||||
|
||||
/** A page in a directory */
|
||||
/** @{ */
|
||||
TypedKeylet<ltDIR_NODE>
|
||||
Keylet
|
||||
page(uint256 const& root, std::uint64_t index = 0) noexcept;
|
||||
|
||||
inline TypedKeylet<ltDIR_NODE>
|
||||
inline Keylet
|
||||
page(Keylet const& root, std::uint64_t index = 0) noexcept
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
@@ -227,11 +227,11 @@ page(Keylet const& root, std::uint64_t index = 0) noexcept
|
||||
/** @} */
|
||||
|
||||
/** An escrow entry */
|
||||
TypedKeylet<ltESCROW>
|
||||
Keylet
|
||||
escrow(AccountID const& src, std::uint32_t seq) noexcept;
|
||||
|
||||
/** A PaymentChannel */
|
||||
TypedKeylet<ltPAYCHAN>
|
||||
Keylet
|
||||
payChan(AccountID const& src, AccountID const& dst, std::uint32_t seq) noexcept;
|
||||
|
||||
/** NFT page keylets
|
||||
@@ -243,110 +243,106 @@ payChan(AccountID const& src, AccountID const& dst, std::uint32_t seq) noexcept;
|
||||
*/
|
||||
/** @{ */
|
||||
/** A keylet for the owner's first possible NFT page. */
|
||||
TypedKeylet<ltNFTOKEN_PAGE>
|
||||
Keylet
|
||||
nftpage_min(AccountID const& owner);
|
||||
|
||||
/** A keylet for the owner's last possible NFT page. */
|
||||
TypedKeylet<ltNFTOKEN_PAGE>
|
||||
Keylet
|
||||
nftpage_max(AccountID const& owner);
|
||||
|
||||
TypedKeylet<ltNFTOKEN_PAGE>
|
||||
nftpage(TypedKeylet<ltNFTOKEN_PAGE> const& k, uint256 const& token);
|
||||
Keylet
|
||||
nftpage(Keylet const& k, uint256 const& token);
|
||||
/** @} */
|
||||
|
||||
/** An offer from an account to buy or sell an NFT */
|
||||
TypedKeylet<ltNFTOKEN_OFFER>
|
||||
Keylet
|
||||
nftoffer(AccountID const& owner, std::uint32_t seq);
|
||||
|
||||
inline TypedKeylet<ltNFTOKEN_OFFER>
|
||||
inline Keylet
|
||||
nftoffer(uint256 const& offer)
|
||||
{
|
||||
return {offer};
|
||||
return {ltNFTOKEN_OFFER, offer};
|
||||
}
|
||||
|
||||
/** The directory of buy offers for the specified NFT */
|
||||
TypedKeylet<ltDIR_NODE>
|
||||
Keylet
|
||||
nft_buys(uint256 const& id) noexcept;
|
||||
|
||||
/** The directory of sell offers for the specified NFT */
|
||||
TypedKeylet<ltDIR_NODE>
|
||||
Keylet
|
||||
nft_sells(uint256 const& id) noexcept;
|
||||
|
||||
/** AMM entry */
|
||||
TypedKeylet<ltAMM>
|
||||
Keylet
|
||||
amm(Asset const& issue1, Asset const& issue2) noexcept;
|
||||
|
||||
TypedKeylet<ltAMM>
|
||||
Keylet
|
||||
amm(uint256 const& amm) noexcept;
|
||||
|
||||
/** A keylet for Delegate object */
|
||||
TypedKeylet<ltDELEGATE>
|
||||
delegate(AccountID const& account, AccountID const& authorizedAccount) noexcept;
|
||||
|
||||
TypedKeylet<ltBRIDGE>
|
||||
Keylet
|
||||
bridge(STXChainBridge const& bridge, STXChainBridge::ChainType chainType);
|
||||
|
||||
TypedKeylet<ltXCHAIN_OWNED_CLAIM_ID>
|
||||
Keylet
|
||||
xChainClaimID(STXChainBridge const& bridge, std::uint64_t seq);
|
||||
|
||||
TypedKeylet<ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID>
|
||||
Keylet
|
||||
xChainCreateAccountClaimID(STXChainBridge const& bridge, std::uint64_t seq);
|
||||
|
||||
TypedKeylet<ltDID>
|
||||
Keylet
|
||||
did(AccountID const& account) noexcept;
|
||||
|
||||
TypedKeylet<ltORACLE>
|
||||
Keylet
|
||||
oracle(AccountID const& account, std::uint32_t const& documentID) noexcept;
|
||||
|
||||
TypedKeylet<ltCREDENTIAL>
|
||||
Keylet
|
||||
credential(
|
||||
AccountID const& subject,
|
||||
AccountID const& issuer,
|
||||
Slice const& credType) noexcept;
|
||||
|
||||
inline TypedKeylet<ltCREDENTIAL>
|
||||
inline Keylet
|
||||
credential(uint256 const& key) noexcept
|
||||
{
|
||||
return {key};
|
||||
return {ltCREDENTIAL, key};
|
||||
}
|
||||
|
||||
TypedKeylet<ltMPTOKEN_ISSUANCE>
|
||||
Keylet
|
||||
mptIssuance(std::uint32_t seq, AccountID const& issuer) noexcept;
|
||||
|
||||
TypedKeylet<ltMPTOKEN_ISSUANCE>
|
||||
Keylet
|
||||
mptIssuance(MPTID const& issuanceID) noexcept;
|
||||
|
||||
inline TypedKeylet<ltMPTOKEN_ISSUANCE>
|
||||
inline Keylet
|
||||
mptIssuance(uint256 const& issuanceKey)
|
||||
{
|
||||
return {issuanceKey};
|
||||
return {ltMPTOKEN_ISSUANCE, issuanceKey};
|
||||
}
|
||||
|
||||
TypedKeylet<ltMPTOKEN>
|
||||
Keylet
|
||||
mptoken(MPTID const& issuanceID, AccountID const& holder) noexcept;
|
||||
|
||||
inline TypedKeylet<ltMPTOKEN>
|
||||
inline Keylet
|
||||
mptoken(uint256 const& mptokenKey)
|
||||
{
|
||||
return {mptokenKey};
|
||||
return {ltMPTOKEN, mptokenKey};
|
||||
}
|
||||
|
||||
TypedKeylet<ltMPTOKEN>
|
||||
Keylet
|
||||
mptoken(uint256 const& issuanceKey, AccountID const& holder) noexcept;
|
||||
|
||||
TypedKeylet<ltVAULT>
|
||||
Keylet
|
||||
vault(AccountID const& owner, std::uint32_t seq) noexcept;
|
||||
|
||||
inline TypedKeylet<ltVAULT>
|
||||
inline Keylet
|
||||
vault(uint256 const& vaultKey)
|
||||
{
|
||||
return {vaultKey};
|
||||
return {ltVAULT, vaultKey};
|
||||
}
|
||||
|
||||
TypedKeylet<ltPERMISSIONED_DOMAIN>
|
||||
Keylet
|
||||
permissionedDomain(AccountID const& account, std::uint32_t seq) noexcept;
|
||||
|
||||
TypedKeylet<ltPERMISSIONED_DOMAIN>
|
||||
Keylet
|
||||
permissionedDomain(uint256 const& domainID) noexcept;
|
||||
} // namespace keylet
|
||||
|
||||
|
||||
@@ -49,22 +49,6 @@ struct Keylet
|
||||
check(STLedgerEntry const&) const;
|
||||
};
|
||||
|
||||
template <LedgerEntryType Type>
|
||||
struct TypedKeylet : Keylet
|
||||
{
|
||||
static constexpr LedgerEntryType LedgerType = Type;
|
||||
|
||||
TypedKeylet(uint256 const& key_) : Keylet(Type, key_)
|
||||
{
|
||||
}
|
||||
|
||||
Keylet
|
||||
untyped() const
|
||||
{
|
||||
return Keylet(LedgerType, key);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
#endif
|
||||
|
||||
@@ -55,33 +55,13 @@ enum LedgerEntryType : std::uint16_t
|
||||
|
||||
#pragma push_macro("LEDGER_ENTRY")
|
||||
#undef LEDGER_ENTRY
|
||||
#pragma push_macro("LEDGER_ENTRY_FIELD")
|
||||
#undef LEDGER_ENTRY_FIELD
|
||||
#pragma push_macro("DEFINE_LEDGER_ENTRY_FIELDS")
|
||||
#undef DEFINE_LEDGER_ENTRY_FIELDS
|
||||
#pragma push_macro("LEDGER_ENTRIES_BEGIN")
|
||||
#undef LEDGER_ENTRIES_BEGIN
|
||||
#pragma push_macro("LEDGER_ENTRIES_END")
|
||||
#undef LEDGER_ENTRIES_END
|
||||
|
||||
#define LEDGER_ENTRIES_BEGIN
|
||||
#define LEDGER_ENTRIES_END
|
||||
#define DEFINE_LEDGER_ENTRY_FIELDS(...) ({__VA_ARGS__})
|
||||
#define LEDGER_ENTRY_FIELD(...) {__VA_ARGS__},
|
||||
#define LEDGER_ENTRY(tag, value, name, rpcName, fields) tag = value,
|
||||
|
||||
#include <xrpl/protocol/detail/ledger_entries.macro>
|
||||
|
||||
#undef LEDGER_ENTRY
|
||||
#pragma pop_macro("LEDGER_ENTRY")
|
||||
#undef LEDGER_ENTRY_FIELD
|
||||
#pragma pop_macro("LEDGER_ENTRY_FIELD")
|
||||
#undef DEFINE_LEDGER_ENTRY_FIELDS
|
||||
#pragma pop_macro("DEFINE_LEDGER_ENTRY_FIELDS")
|
||||
#undef LEDGER_ENTRIES_BEGIN
|
||||
#pragma pop_macro("LEDGER_ENTRIES_BEGIN")
|
||||
#undef LEDGER_ENTRIES_END
|
||||
#pragma pop_macro("LEDGER_ENTRIES_END")
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/** A special type, matching any ledger entry type.
|
||||
@@ -152,7 +132,7 @@ enum LedgerSpecificFlags {
|
||||
lsfNoFreeze = 0x00200000, // True, cannot freeze ripple states
|
||||
lsfGlobalFreeze = 0x00400000, // True, all assets frozen
|
||||
lsfDefaultRipple =
|
||||
0x00800000, // True, incoming trust lines allow rippling by default
|
||||
0x00800000, // True, trust lines allow rippling by default
|
||||
lsfDepositAuth = 0x01000000, // True, all deposits require authorization
|
||||
/* // reserved for Hooks amendment
|
||||
lsfTshCollect = 0x02000000, // True, allow TSH collect-calls to acc hooks
|
||||
@@ -165,15 +145,13 @@ enum LedgerSpecificFlags {
|
||||
0x10000000, // True, reject new paychans
|
||||
lsfDisallowIncomingTrustline =
|
||||
0x20000000, // True, reject new trustlines (only if no issued assets)
|
||||
lsfAllowTrustLineLocking =
|
||||
0x40000000, // True, enable trustline locking
|
||||
// 0x40000000 is available
|
||||
lsfAllowTrustLineClawback =
|
||||
0x80000000, // True, enable clawback
|
||||
|
||||
// ltOFFER
|
||||
lsfPassive = 0x00010000,
|
||||
lsfSell = 0x00020000, // True, offer was placed as a sell.
|
||||
lsfHybrid = 0x00040000, // True, offer is hybrid.
|
||||
|
||||
// ltRIPPLE_STATE
|
||||
lsfLowReserve = 0x00010000, // True, if entry counts toward reserve.
|
||||
|
||||
@@ -80,7 +80,7 @@ struct MultiApiJson
|
||||
}
|
||||
|
||||
void
|
||||
set(char const* key, auto const& v)
|
||||
set(const char* key, auto const& v)
|
||||
requires std::constructible_from<Json::Value, decltype(v)>
|
||||
{
|
||||
for (auto& a : this->val)
|
||||
@@ -91,7 +91,7 @@ struct MultiApiJson
|
||||
enum IsMemberResult : int { none = 0, some, all };
|
||||
|
||||
[[nodiscard]] IsMemberResult
|
||||
isMember(char const* key) const
|
||||
isMember(const char* key) const
|
||||
{
|
||||
int count = 0;
|
||||
for (auto& a : this->val)
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
namespace RPC {
|
||||
|
||||
/**
|
||||
Adds common synthetic fields to transaction-related JSON responses
|
||||
|
||||
@@ -42,7 +40,6 @@ insertNFTSyntheticInJson(
|
||||
TxMeta const&);
|
||||
/** @} */
|
||||
|
||||
} // namespace RPC
|
||||
} // namespace ripple
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of rippled: https://github.com/ripple/rippled
|
||||
Copyright (c) 2025 Ripple Labs Inc.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_PROTOCOL_PERMISSION_H_INCLUDED
|
||||
#define RIPPLE_PROTOCOL_PERMISSION_H_INCLUDED
|
||||
|
||||
#include <xrpl/protocol/TxFormats.h>
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace ripple {
|
||||
/**
|
||||
* We have both transaction type permissions and granular type permissions.
|
||||
* Since we will reuse the TransactionFormats to parse the Transaction
|
||||
* Permissions, only the GranularPermissionType is defined here. To prevent
|
||||
* conflicts with TxType, the GranularPermissionType is always set to a value
|
||||
* greater than the maximum value of uint16.
|
||||
*/
|
||||
enum GranularPermissionType : std::uint32_t {
|
||||
#pragma push_macro("PERMISSION")
|
||||
#undef PERMISSION
|
||||
|
||||
#define PERMISSION(type, txType, value) type = value,
|
||||
|
||||
#include <xrpl/protocol/detail/permissions.macro>
|
||||
|
||||
#undef PERMISSION
|
||||
#pragma pop_macro("PERMISSION")
|
||||
};
|
||||
|
||||
enum Delegation { delegatable, notDelegatable };
|
||||
|
||||
class Permission
|
||||
{
|
||||
private:
|
||||
Permission();
|
||||
|
||||
std::unordered_map<std::uint16_t, Delegation> delegatableTx_;
|
||||
|
||||
std::unordered_map<std::string, GranularPermissionType>
|
||||
granularPermissionMap_;
|
||||
|
||||
std::unordered_map<GranularPermissionType, std::string> granularNameMap_;
|
||||
|
||||
std::unordered_map<GranularPermissionType, TxType> granularTxTypeMap_;
|
||||
|
||||
public:
|
||||
static Permission const&
|
||||
getInstance();
|
||||
|
||||
Permission(Permission const&) = delete;
|
||||
Permission&
|
||||
operator=(Permission const&) = delete;
|
||||
|
||||
std::optional<std::uint32_t>
|
||||
getGranularValue(std::string const& name) const;
|
||||
|
||||
std::optional<std::string>
|
||||
getGranularName(GranularPermissionType const& value) const;
|
||||
|
||||
std::optional<TxType>
|
||||
getGranularTxType(GranularPermissionType const& gpType) const;
|
||||
|
||||
bool
|
||||
isDelegatable(std::uint32_t const& permissionValue) const;
|
||||
|
||||
// for tx level permission, permission value is equal to tx type plus one
|
||||
uint32_t
|
||||
txToPermissionType(TxType const& type) const;
|
||||
|
||||
// tx type value is permission value minus one
|
||||
TxType
|
||||
permissionToTxType(uint32_t const& value) const;
|
||||
};
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
#endif
|
||||
@@ -122,10 +122,6 @@ std::size_t constexpr maxDataPayloadLength = 256;
|
||||
/** Vault withdrawal policies */
|
||||
std::uint8_t constexpr vaultStrategyFirstComeFirstServe = 1;
|
||||
|
||||
/** Maximum recursion depth for vault shares being put as an asset inside
|
||||
* another vault; counted from 0 */
|
||||
std::uint8_t constexpr maxAssetCheckDepth = 5;
|
||||
|
||||
/** A ledger index. */
|
||||
using LedgerIndex = std::uint32_t;
|
||||
|
||||
@@ -165,13 +161,6 @@ std::size_t constexpr maxPriceScale = 20;
|
||||
*/
|
||||
std::size_t constexpr maxTrim = 25;
|
||||
|
||||
/** The maximum number of delegate permissions an account can grant
|
||||
*/
|
||||
std::size_t constexpr permissionMaxSize = 10;
|
||||
|
||||
/** The maximum number of transactions that can be in a batch. */
|
||||
std::size_t constexpr maxBatchTxCount = 8;
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
#endif
|
||||
|
||||
@@ -113,8 +113,8 @@ public:
|
||||
// have lower unsigned integer representations.
|
||||
using value_type = std::uint64_t;
|
||||
|
||||
static int const minTickSize = 3;
|
||||
static int const maxTickSize = 16;
|
||||
static const int minTickSize = 3;
|
||||
static const int maxTickSize = 16;
|
||||
|
||||
private:
|
||||
// This has the same representation as STAmount, see the comment on the
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
bool
|
||||
isFeatureEnabled(uint256 const& feature);
|
||||
|
||||
class DigestAwareReadView;
|
||||
|
||||
/** Rules controlling protocol behavior. */
|
||||
|
||||
@@ -181,22 +181,22 @@ public:
|
||||
private_access_tag_t,
|
||||
SerializedTypeID tid,
|
||||
int fv,
|
||||
char const* fn,
|
||||
const char* fn,
|
||||
int meta = sMD_Default,
|
||||
IsSigning signing = IsSigning::yes);
|
||||
explicit SField(private_access_tag_t, int fc);
|
||||
|
||||
static SField const&
|
||||
static const SField&
|
||||
getField(int fieldCode);
|
||||
static SField const&
|
||||
static const SField&
|
||||
getField(std::string const& fieldName);
|
||||
static SField const&
|
||||
static const SField&
|
||||
getField(int type, int value)
|
||||
{
|
||||
return getField(field_code(type, value));
|
||||
}
|
||||
|
||||
static SField const&
|
||||
static const SField&
|
||||
getField(SerializedTypeID type, int value)
|
||||
{
|
||||
return getField(field_code(type, value));
|
||||
@@ -283,19 +283,19 @@ public:
|
||||
}
|
||||
|
||||
bool
|
||||
operator==(SField const& f) const
|
||||
operator==(const SField& f) const
|
||||
{
|
||||
return fieldCode == f.fieldCode;
|
||||
}
|
||||
|
||||
bool
|
||||
operator!=(SField const& f) const
|
||||
operator!=(const SField& f) const
|
||||
{
|
||||
return fieldCode != f.fieldCode;
|
||||
}
|
||||
|
||||
static int
|
||||
compare(SField const& f1, SField const& f2);
|
||||
compare(const SField& f1, const SField& f2);
|
||||
|
||||
static std::map<int, SField const*> const&
|
||||
getKnownCodeToField()
|
||||
@@ -368,15 +368,11 @@ using SF_XCHAIN_BRIDGE = TypedField<STXChainBridge>;
|
||||
#undef UNTYPED_SFIELD
|
||||
#pragma push_macro("TYPED_SFIELD")
|
||||
#undef TYPED_SFIELD
|
||||
#pragma push_macro("ARRAY_SFIELD")
|
||||
#undef ARRAY_SFIELD
|
||||
|
||||
#define UNTYPED_SFIELD(sfName, stiSuffix, fieldValue, ...) \
|
||||
extern SField const sfName;
|
||||
#define TYPED_SFIELD(sfName, stiSuffix, fieldValue, ...) \
|
||||
extern SF_##stiSuffix const sfName;
|
||||
#define ARRAY_SFIELD(sfName, sfItemName, stiSuffix, fieldValue, ...) \
|
||||
UNTYPED_SFIELD(sfName, stiSuffix, fieldValue, __VA_ARGS__)
|
||||
|
||||
extern SField const sfInvalid;
|
||||
extern SField const sfGeneric;
|
||||
@@ -387,8 +383,6 @@ extern SField const sfGeneric;
|
||||
#pragma pop_macro("TYPED_SFIELD")
|
||||
#undef UNTYPED_SFIELD
|
||||
#pragma pop_macro("UNTYPED_SFIELD")
|
||||
#undef ARRAY_SFIELD
|
||||
#pragma pop_macro("ARRAY_SFIELD")
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
add(Serializer& s) const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
|
||||
@@ -62,20 +62,20 @@ private:
|
||||
public:
|
||||
using value_type = STAmount;
|
||||
|
||||
static int const cMinOffset = -96;
|
||||
static int const cMaxOffset = 80;
|
||||
static const int cMinOffset = -96;
|
||||
static const int cMaxOffset = 80;
|
||||
|
||||
// Maximum native value supported by the code
|
||||
static std::uint64_t const cMinValue = 1000000000000000ull;
|
||||
static std::uint64_t const cMaxValue = 9999999999999999ull;
|
||||
static std::uint64_t const cMaxNative = 9000000000000000000ull;
|
||||
static const std::uint64_t cMinValue = 1000000000000000ull;
|
||||
static const std::uint64_t cMaxValue = 9999999999999999ull;
|
||||
static const std::uint64_t cMaxNative = 9000000000000000000ull;
|
||||
|
||||
// Max native value on network.
|
||||
static std::uint64_t const cMaxNativeN = 100000000000000000ull;
|
||||
static std::uint64_t const cIssuedCurrency = 0x8000000000000000ull;
|
||||
static std::uint64_t const cPositive = 0x4000000000000000ull;
|
||||
static std::uint64_t const cMPToken = 0x2000000000000000ull;
|
||||
static std::uint64_t const cValueMask = ~(cPositive | cMPToken);
|
||||
static const std::uint64_t cMaxNativeN = 100000000000000000ull;
|
||||
static const std::uint64_t cIssuedCurrency = 0x8000000000000000ull;
|
||||
static const std::uint64_t cPositive = 0x4000000000000000ull;
|
||||
static const std::uint64_t cMPToken = 0x2000000000000000ull;
|
||||
static const std::uint64_t cValueMask = ~(cPositive | cMPToken);
|
||||
|
||||
static std::uint64_t const uRateOne;
|
||||
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
add(Serializer& s) const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
@@ -703,12 +703,6 @@ isXRP(STAmount const& amount)
|
||||
return amount.native();
|
||||
}
|
||||
|
||||
bool
|
||||
canAdd(STAmount const& amt1, STAmount const& amt2);
|
||||
|
||||
bool
|
||||
canSubtract(STAmount const& amt1, STAmount const& amt2);
|
||||
|
||||
// Since `canonicalize` does not have access to a ledger, this is needed to put
|
||||
// the low-level routine stAmountCanonicalize on an amendment switch. Only
|
||||
// transactions need to use this switchover. Outside of a transaction it's safe
|
||||
|
||||
@@ -128,13 +128,13 @@ public:
|
||||
add(Serializer& s) const override;
|
||||
|
||||
void
|
||||
sort(bool (*compare)(STObject const& o1, STObject const& o2));
|
||||
sort(bool (*compare)(const STObject& o1, const STObject& o2));
|
||||
|
||||
bool
|
||||
operator==(STArray const& s) const;
|
||||
operator==(const STArray& s) const;
|
||||
|
||||
bool
|
||||
operator!=(STArray const& s) const;
|
||||
operator!=(const STArray& s) const;
|
||||
|
||||
iterator
|
||||
erase(iterator pos);
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
getSType() const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
@@ -275,13 +275,13 @@ STArray::swap(STArray& a) noexcept
|
||||
}
|
||||
|
||||
inline bool
|
||||
STArray::operator==(STArray const& s) const
|
||||
STArray::operator==(const STArray& s) const
|
||||
{
|
||||
return v_ == s.v_;
|
||||
}
|
||||
|
||||
inline bool
|
||||
STArray::operator!=(STArray const& s) const
|
||||
STArray::operator!=(const STArray& s) const
|
||||
{
|
||||
return v_ != s.v_;
|
||||
}
|
||||
|
||||
@@ -93,9 +93,7 @@ struct JsonOptions
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
requires requires(T const& t) {
|
||||
{ t.getJson(JsonOptions::none) } -> std::convertible_to<Json::Value>;
|
||||
}
|
||||
requires requires(T const& t) { t.getJson(JsonOptions::none); }
|
||||
Json::Value
|
||||
to_json(T const& t)
|
||||
{
|
||||
@@ -139,16 +137,16 @@ class STBase
|
||||
public:
|
||||
virtual ~STBase() = default;
|
||||
STBase();
|
||||
STBase(STBase const&) = default;
|
||||
STBase(const STBase&) = default;
|
||||
STBase&
|
||||
operator=(STBase const& t);
|
||||
operator=(const STBase& t);
|
||||
|
||||
explicit STBase(SField const& n);
|
||||
|
||||
bool
|
||||
operator==(STBase const& t) const;
|
||||
operator==(const STBase& t) const;
|
||||
bool
|
||||
operator!=(STBase const& t) const;
|
||||
operator!=(const STBase& t) const;
|
||||
|
||||
template <class D>
|
||||
D&
|
||||
@@ -207,7 +205,7 @@ private:
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
std::ostream&
|
||||
operator<<(std::ostream& out, STBase const& t);
|
||||
operator<<(std::ostream& out, const STBase& t);
|
||||
|
||||
template <class D>
|
||||
D&
|
||||
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
STBitString() = default;
|
||||
|
||||
STBitString(SField const& n);
|
||||
STBitString(value_type const& v);
|
||||
STBitString(SField const& n, value_type const& v);
|
||||
STBitString(const value_type& v);
|
||||
STBitString(SField const& n, const value_type& v);
|
||||
STBitString(SerialIter& sit, SField const& name);
|
||||
|
||||
SerializedTypeID
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
getText() const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
void
|
||||
add(Serializer& s) const override;
|
||||
@@ -93,12 +93,12 @@ inline STBitString<Bits>::STBitString(SField const& n) : STBase(n)
|
||||
}
|
||||
|
||||
template <int Bits>
|
||||
inline STBitString<Bits>::STBitString(value_type const& v) : value_(v)
|
||||
inline STBitString<Bits>::STBitString(const value_type& v) : value_(v)
|
||||
{
|
||||
}
|
||||
|
||||
template <int Bits>
|
||||
inline STBitString<Bits>::STBitString(SField const& n, value_type const& v)
|
||||
inline STBitString<Bits>::STBitString(SField const& n, const value_type& v)
|
||||
: STBase(n), value_(v)
|
||||
{
|
||||
}
|
||||
@@ -160,9 +160,9 @@ STBitString<Bits>::getText() const
|
||||
|
||||
template <int Bits>
|
||||
bool
|
||||
STBitString<Bits>::isEquivalent(STBase const& t) const
|
||||
STBitString<Bits>::isEquivalent(const STBase& t) const
|
||||
{
|
||||
STBitString const* v = dynamic_cast<STBitString const*>(&t);
|
||||
const STBitString* v = dynamic_cast<const STBitString*>(&t);
|
||||
return v && (value_ == v->value_);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
add(Serializer& s) const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
add(Serializer& s) const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
isDefault() const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
STInteger&
|
||||
operator=(value_type const& v);
|
||||
@@ -127,9 +127,9 @@ STInteger<Integer>::isDefault() const
|
||||
|
||||
template <typename Integer>
|
||||
inline bool
|
||||
STInteger<Integer>::isEquivalent(STBase const& t) const
|
||||
STInteger<Integer>::isEquivalent(const STBase& t) const
|
||||
{
|
||||
STInteger const* v = dynamic_cast<STInteger const*>(&t);
|
||||
const STInteger* v = dynamic_cast<const STInteger*>(&t);
|
||||
return v && (value_ == v->value_);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,12 @@ public:
|
||||
|
||||
STIssue&
|
||||
operator=(STIssue const& rhs) = default;
|
||||
STIssue&
|
||||
operator=(Asset const& rhs)
|
||||
{
|
||||
asset_ = rhs;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <ValidIssueType TIss>
|
||||
TIss const&
|
||||
@@ -75,7 +81,7 @@ public:
|
||||
add(Serializer& s) const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
|
||||
@@ -35,7 +35,7 @@ class STLedgerEntry final : public STObject, public CountedObject<STLedgerEntry>
|
||||
|
||||
public:
|
||||
using pointer = std::shared_ptr<STLedgerEntry>;
|
||||
using ref = std::shared_ptr<STLedgerEntry> const&;
|
||||
using ref = const std::shared_ptr<STLedgerEntry>&;
|
||||
|
||||
/** Create an empty object with the given key and type. */
|
||||
explicit STLedgerEntry(Keylet const& k);
|
||||
|
||||
@@ -99,8 +99,8 @@ public:
|
||||
STObject&
|
||||
operator=(STObject&& other);
|
||||
|
||||
STObject(SOTemplate const& type, SField const& name);
|
||||
STObject(SOTemplate const& type, SerialIter& sit, SField const& name);
|
||||
STObject(const SOTemplate& type, SField const& name);
|
||||
STObject(const SOTemplate& type, SerialIter& sit, SField const& name);
|
||||
STObject(SerialIter& sit, SField const& name, int depth = 0);
|
||||
STObject(SerialIter&& sit, SField const& name);
|
||||
explicit STObject(SField const& name);
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
reserve(std::size_t n);
|
||||
|
||||
void
|
||||
applyTemplate(SOTemplate const& type);
|
||||
applyTemplate(const SOTemplate& type);
|
||||
|
||||
void
|
||||
applyTemplateFromSField(SField const&);
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
isFree() const;
|
||||
|
||||
void
|
||||
set(SOTemplate const&);
|
||||
set(const SOTemplate&);
|
||||
|
||||
bool
|
||||
set(SerialIter& u, int depth = 0);
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
getSType() const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
@@ -182,13 +182,13 @@ public:
|
||||
uint256
|
||||
getSigningHash(HashPrefix prefix) const;
|
||||
|
||||
STBase const&
|
||||
const STBase&
|
||||
peekAtIndex(int offset) const;
|
||||
|
||||
STBase&
|
||||
getIndex(int offset);
|
||||
|
||||
STBase const*
|
||||
const STBase*
|
||||
peekAtPIndex(int offset) const;
|
||||
|
||||
STBase*
|
||||
@@ -200,13 +200,13 @@ public:
|
||||
SField const&
|
||||
getFieldSType(int index) const;
|
||||
|
||||
STBase const&
|
||||
const STBase&
|
||||
peekAtField(SField const& field) const;
|
||||
|
||||
STBase&
|
||||
getField(SField const& field);
|
||||
|
||||
STBase const*
|
||||
const STBase*
|
||||
peekAtPField(SField const& field) const;
|
||||
|
||||
STBase*
|
||||
@@ -240,11 +240,11 @@ public:
|
||||
getFieldAmount(SField const& field) const;
|
||||
STPathSet const&
|
||||
getFieldPathSet(SField const& field) const;
|
||||
STVector256 const&
|
||||
const STVector256&
|
||||
getFieldV256(SField const& field) const;
|
||||
STArray const&
|
||||
const STArray&
|
||||
getFieldArray(SField const& field) const;
|
||||
STCurrency const&
|
||||
const STCurrency&
|
||||
getFieldCurrency(SField const& field) const;
|
||||
STNumber const&
|
||||
getFieldNumber(SField const& field) const;
|
||||
@@ -408,12 +408,12 @@ public:
|
||||
delField(int index);
|
||||
|
||||
bool
|
||||
hasMatchingEntry(STBase const&);
|
||||
hasMatchingEntry(const STBase&);
|
||||
|
||||
bool
|
||||
operator==(STObject const& o) const;
|
||||
operator==(const STObject& o) const;
|
||||
bool
|
||||
operator!=(STObject const& o) const;
|
||||
operator!=(const STObject& o) const;
|
||||
|
||||
class FieldErr;
|
||||
|
||||
@@ -981,7 +981,7 @@ STObject::getCount() const
|
||||
return v_.size();
|
||||
}
|
||||
|
||||
inline STBase const&
|
||||
inline const STBase&
|
||||
STObject::peekAtIndex(int offset) const
|
||||
{
|
||||
return v_[offset].get();
|
||||
@@ -993,7 +993,7 @@ STObject::getIndex(int offset)
|
||||
return v_[offset].get();
|
||||
}
|
||||
|
||||
inline STBase const*
|
||||
inline const STBase*
|
||||
STObject::peekAtPIndex(int offset) const
|
||||
{
|
||||
return &v_[offset].get();
|
||||
@@ -1128,7 +1128,7 @@ STObject::setFieldH160(SField const& field, base_uint<160, Tag> const& v)
|
||||
}
|
||||
|
||||
inline bool
|
||||
STObject::operator!=(STObject const& o) const
|
||||
STObject::operator!=(const STObject& o) const
|
||||
{
|
||||
return !(*this == o);
|
||||
}
|
||||
@@ -1137,7 +1137,7 @@ template <typename T, typename V>
|
||||
V
|
||||
STObject::getFieldByValue(SField const& field) const
|
||||
{
|
||||
STBase const* rf = peekAtPField(field);
|
||||
const STBase* rf = peekAtPField(field);
|
||||
|
||||
if (!rf)
|
||||
throwFieldNotFound(field);
|
||||
@@ -1147,7 +1147,7 @@ STObject::getFieldByValue(SField const& field) const
|
||||
if (id == STI_NOTPRESENT)
|
||||
return V(); // optional field not present
|
||||
|
||||
T const* cf = dynamic_cast<T const*>(rf);
|
||||
const T* cf = dynamic_cast<const T*>(rf);
|
||||
|
||||
if (!cf)
|
||||
Throw<std::runtime_error>("Wrong field type");
|
||||
@@ -1164,7 +1164,7 @@ template <typename T, typename V>
|
||||
V const&
|
||||
STObject::getFieldByConstRef(SField const& field, V const& empty) const
|
||||
{
|
||||
STBase const* rf = peekAtPField(field);
|
||||
const STBase* rf = peekAtPField(field);
|
||||
|
||||
if (!rf)
|
||||
throwFieldNotFound(field);
|
||||
@@ -1174,7 +1174,7 @@ STObject::getFieldByConstRef(SField const& field, V const& empty) const
|
||||
if (id == STI_NOTPRESENT)
|
||||
return empty; // optional field not present
|
||||
|
||||
T const* cf = dynamic_cast<T const*>(rf);
|
||||
const T* cf = dynamic_cast<const T*>(rf);
|
||||
|
||||
if (!cf)
|
||||
Throw<std::runtime_error>("Wrong field type");
|
||||
|
||||
@@ -106,10 +106,10 @@ public:
|
||||
getIssuerID() const;
|
||||
|
||||
bool
|
||||
operator==(STPathElement const& t) const;
|
||||
operator==(const STPathElement& t) const;
|
||||
|
||||
bool
|
||||
operator!=(STPathElement const& t) const;
|
||||
operator!=(const STPathElement& t) const;
|
||||
|
||||
private:
|
||||
static std::size_t
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
STPathElement&
|
||||
operator[](int i);
|
||||
|
||||
STPathElement const&
|
||||
const STPathElement&
|
||||
operator[](int i) const;
|
||||
|
||||
void
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
assembleAdd(STPath const& base, STPathElement const& tail);
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
@@ -375,7 +375,7 @@ STPathElement::getIssuerID() const
|
||||
}
|
||||
|
||||
inline bool
|
||||
STPathElement::operator==(STPathElement const& t) const
|
||||
STPathElement::operator==(const STPathElement& t) const
|
||||
{
|
||||
return (mType & typeAccount) == (t.mType & typeAccount) &&
|
||||
hash_value_ == t.hash_value_ && mAccountID == t.mAccountID &&
|
||||
@@ -383,7 +383,7 @@ STPathElement::operator==(STPathElement const& t) const
|
||||
}
|
||||
|
||||
inline bool
|
||||
STPathElement::operator!=(STPathElement const& t) const
|
||||
STPathElement::operator!=(const STPathElement& t) const
|
||||
{
|
||||
return !operator==(t);
|
||||
}
|
||||
@@ -455,7 +455,7 @@ STPath::operator[](int i)
|
||||
return mPath[i];
|
||||
}
|
||||
|
||||
inline STPathElement const&
|
||||
inline const STPathElement&
|
||||
STPath::operator[](int i) const
|
||||
{
|
||||
return mPath[i];
|
||||
|
||||
@@ -125,16 +125,10 @@ public:
|
||||
@return `true` if valid signature. If invalid, the error message string.
|
||||
*/
|
||||
enum class RequireFullyCanonicalSig : bool { no, yes };
|
||||
|
||||
Expected<void, std::string>
|
||||
checkSign(RequireFullyCanonicalSig requireCanonicalSig, Rules const& rules)
|
||||
const;
|
||||
|
||||
Expected<void, std::string>
|
||||
checkBatchSign(
|
||||
RequireFullyCanonicalSig requireCanonicalSig,
|
||||
Rules const& rules) const;
|
||||
|
||||
// SQL Functions with metadata.
|
||||
static std::string const&
|
||||
getMetaSQLInsertReplaceHeader();
|
||||
@@ -150,9 +144,6 @@ public:
|
||||
char status,
|
||||
std::string const& escapedMetaData) const;
|
||||
|
||||
std::vector<uint256>
|
||||
getBatchTransactionIDs() const;
|
||||
|
||||
private:
|
||||
Expected<void, std::string>
|
||||
checkSingleSign(RequireFullyCanonicalSig requireCanonicalSig) const;
|
||||
@@ -162,24 +153,12 @@ private:
|
||||
RequireFullyCanonicalSig requireCanonicalSig,
|
||||
Rules const& rules) const;
|
||||
|
||||
Expected<void, std::string>
|
||||
checkBatchSingleSign(
|
||||
STObject const& batchSigner,
|
||||
RequireFullyCanonicalSig requireCanonicalSig) const;
|
||||
|
||||
Expected<void, std::string>
|
||||
checkBatchMultiSign(
|
||||
STObject const& batchSigner,
|
||||
RequireFullyCanonicalSig requireCanonicalSig,
|
||||
Rules const& rules) const;
|
||||
|
||||
STBase*
|
||||
copy(std::size_t n, void* buf) const override;
|
||||
STBase*
|
||||
move(std::size_t n, void* buf) override;
|
||||
|
||||
friend class detail::STVar;
|
||||
mutable std::vector<uint256> batch_txn_ids_;
|
||||
};
|
||||
|
||||
bool
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
Json::Value getJson(JsonOptions) const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
operator=(std::vector<uint256>&& v);
|
||||
|
||||
void
|
||||
setValue(STVector256 const& v);
|
||||
setValue(const STVector256& v);
|
||||
|
||||
/** Retrieve a copy of the vector we contain */
|
||||
explicit
|
||||
@@ -153,7 +153,7 @@ STVector256::operator=(std::vector<uint256>&& v)
|
||||
}
|
||||
|
||||
inline void
|
||||
STVector256::setValue(STVector256 const& v)
|
||||
STVector256::setValue(const STVector256& v)
|
||||
{
|
||||
mValue = v.mValue;
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
add(Serializer& s) const override;
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
isEquivalent(const STBase& t) const override;
|
||||
|
||||
bool
|
||||
isDefault() const override;
|
||||
|
||||
@@ -139,9 +139,9 @@ public:
|
||||
int
|
||||
addRaw(Slice slice);
|
||||
int
|
||||
addRaw(void const* ptr, int len);
|
||||
addRaw(const void* ptr, int len);
|
||||
int
|
||||
addRaw(Serializer const& s);
|
||||
addRaw(const Serializer& s);
|
||||
|
||||
int
|
||||
addVL(Blob const& vector);
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
int
|
||||
addVL(Iter begin, Iter end, int len);
|
||||
int
|
||||
addVL(void const* ptr, int len);
|
||||
addVL(const void* ptr, int len);
|
||||
|
||||
// disassemble functions
|
||||
bool
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
bool
|
||||
getInteger(Integer& number, int offset)
|
||||
{
|
||||
static auto const bytes = sizeof(Integer);
|
||||
static const auto bytes = sizeof(Integer);
|
||||
if ((offset + bytes) > mData.size())
|
||||
return false;
|
||||
number = 0;
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
{
|
||||
return mData.size();
|
||||
}
|
||||
void const*
|
||||
const void*
|
||||
getDataPtr() const
|
||||
{
|
||||
return mData.data();
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
std::string
|
||||
getString() const
|
||||
{
|
||||
return std::string(static_cast<char const*>(getDataPtr()), size());
|
||||
return std::string(static_cast<const char*>(getDataPtr()), size());
|
||||
}
|
||||
void
|
||||
erase()
|
||||
@@ -296,12 +296,12 @@ public:
|
||||
return v != mData;
|
||||
}
|
||||
bool
|
||||
operator==(Serializer const& v) const
|
||||
operator==(const Serializer& v) const
|
||||
{
|
||||
return v.mData == mData;
|
||||
}
|
||||
bool
|
||||
operator!=(Serializer const& v) const
|
||||
operator!=(const Serializer& v) const
|
||||
{
|
||||
return v.mData != mData;
|
||||
}
|
||||
|
||||
@@ -139,8 +139,8 @@ enum TEMcodes : TERUnderlyingType {
|
||||
|
||||
temARRAY_EMPTY,
|
||||
temARRAY_TOO_LARGE,
|
||||
|
||||
temBAD_TRANSFER_FEE,
|
||||
temINVALID_INNER_BATCH,
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -360,8 +360,6 @@ enum TECcodes : TERUnderlyingType {
|
||||
tecWRONG_ASSET = 194,
|
||||
tecLIMIT_EXCEEDED = 195,
|
||||
tecPSEUDO_ACCOUNT = 196,
|
||||
tecPRECISION_LOSS = 197,
|
||||
tecNO_DELEGATE_PERMISSION = 198,
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -647,37 +645,37 @@ using TER = TERSubset<CanCvtToTER>;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
inline bool
|
||||
isTelLocal(TER x) noexcept
|
||||
isTelLocal(TER x)
|
||||
{
|
||||
return (x >= telLOCAL_ERROR && x < temMALFORMED);
|
||||
return ((x) >= telLOCAL_ERROR && (x) < temMALFORMED);
|
||||
}
|
||||
|
||||
inline bool
|
||||
isTemMalformed(TER x) noexcept
|
||||
isTemMalformed(TER x)
|
||||
{
|
||||
return (x >= temMALFORMED && x < tefFAILURE);
|
||||
return ((x) >= temMALFORMED && (x) < tefFAILURE);
|
||||
}
|
||||
|
||||
inline bool
|
||||
isTefFailure(TER x) noexcept
|
||||
isTefFailure(TER x)
|
||||
{
|
||||
return (x >= tefFAILURE && x < terRETRY);
|
||||
return ((x) >= tefFAILURE && (x) < terRETRY);
|
||||
}
|
||||
|
||||
inline bool
|
||||
isTerRetry(TER x) noexcept
|
||||
isTerRetry(TER x)
|
||||
{
|
||||
return (x >= terRETRY && x < tesSUCCESS);
|
||||
return ((x) >= terRETRY && (x) < tesSUCCESS);
|
||||
}
|
||||
|
||||
inline bool
|
||||
isTesSuccess(TER x) noexcept
|
||||
isTesSuccess(TER x)
|
||||
{
|
||||
return (x == tesSUCCESS);
|
||||
return ((x) == tesSUCCESS);
|
||||
}
|
||||
|
||||
inline bool
|
||||
isTecClaim(TER x) noexcept
|
||||
isTecClaim(TER x)
|
||||
{
|
||||
return ((x) >= tecCLAIM);
|
||||
}
|
||||
|
||||
@@ -58,8 +58,7 @@ namespace ripple {
|
||||
// clang-format off
|
||||
// Universal Transaction flags:
|
||||
constexpr std::uint32_t tfFullyCanonicalSig = 0x80000000;
|
||||
constexpr std::uint32_t tfInnerBatchTxn = 0x40000000;
|
||||
constexpr std::uint32_t tfUniversal = tfFullyCanonicalSig | tfInnerBatchTxn;
|
||||
constexpr std::uint32_t tfUniversal = tfFullyCanonicalSig;
|
||||
constexpr std::uint32_t tfUniversalMask = ~tfUniversal;
|
||||
|
||||
// AccountSet flags:
|
||||
@@ -92,16 +91,14 @@ constexpr std::uint32_t asfDisallowIncomingCheck = 13;
|
||||
constexpr std::uint32_t asfDisallowIncomingPayChan = 14;
|
||||
constexpr std::uint32_t asfDisallowIncomingTrustline = 15;
|
||||
constexpr std::uint32_t asfAllowTrustLineClawback = 16;
|
||||
constexpr std::uint32_t asfAllowTrustLineLocking = 17;
|
||||
|
||||
// OfferCreate flags:
|
||||
constexpr std::uint32_t tfPassive = 0x00010000;
|
||||
constexpr std::uint32_t tfImmediateOrCancel = 0x00020000;
|
||||
constexpr std::uint32_t tfFillOrKill = 0x00040000;
|
||||
constexpr std::uint32_t tfSell = 0x00080000;
|
||||
constexpr std::uint32_t tfHybrid = 0x00100000;
|
||||
constexpr std::uint32_t tfOfferCreateMask =
|
||||
~(tfUniversal | tfPassive | tfImmediateOrCancel | tfFillOrKill | tfSell | tfHybrid);
|
||||
~(tfUniversal | tfPassive | tfImmediateOrCancel | tfFillOrKill | tfSell);
|
||||
|
||||
// Payment flags:
|
||||
constexpr std::uint32_t tfNoRippleDirect = 0x00010000;
|
||||
@@ -122,7 +119,6 @@ constexpr std::uint32_t tfClearDeepFreeze = 0x00800000;
|
||||
constexpr std::uint32_t tfTrustSetMask =
|
||||
~(tfUniversal | tfSetfAuth | tfSetNoRipple | tfClearNoRipple | tfSetFreeze |
|
||||
tfClearFreeze | tfSetDeepFreeze | tfClearDeepFreeze);
|
||||
constexpr std::uint32_t tfTrustSetPermissionMask = ~(tfUniversal | tfSetfAuth | tfSetFreeze | tfClearFreeze);
|
||||
|
||||
// EnableAmendment flags:
|
||||
constexpr std::uint32_t tfGotMajority = 0x00010000;
|
||||
@@ -159,7 +155,6 @@ constexpr std::uint32_t const tfMPTokenAuthorizeMask = ~(tfUniversal | tfMPTUna
|
||||
constexpr std::uint32_t const tfMPTLock = 0x00000001;
|
||||
constexpr std::uint32_t const tfMPTUnlock = 0x00000002;
|
||||
constexpr std::uint32_t const tfMPTokenIssuanceSetMask = ~(tfUniversal | tfMPTLock | tfMPTUnlock);
|
||||
constexpr std::uint32_t const tfMPTokenIssuanceSetPermissionMask = ~(tfUniversal | tfMPTLock | tfMPTUnlock);
|
||||
|
||||
// MPTokenIssuanceDestroy flags:
|
||||
constexpr std::uint32_t const tfMPTokenIssuanceDestroyMask = ~tfUniversal;
|
||||
@@ -235,20 +230,9 @@ constexpr std::uint32_t const tfVaultPrivate = 0x00010000;
|
||||
static_assert(tfVaultPrivate == lsfVaultPrivate);
|
||||
constexpr std::uint32_t const tfVaultShareNonTransferable = 0x00020000;
|
||||
constexpr std::uint32_t const tfVaultCreateMask = ~(tfUniversal | tfVaultPrivate | tfVaultShareNonTransferable);
|
||||
|
||||
// Batch Flags:
|
||||
constexpr std::uint32_t tfAllOrNothing = 0x00010000;
|
||||
constexpr std::uint32_t tfOnlyOne = 0x00020000;
|
||||
constexpr std::uint32_t tfUntilFailure = 0x00040000;
|
||||
constexpr std::uint32_t tfIndependent = 0x00080000;
|
||||
/**
|
||||
* @note If nested Batch transactions are supported in the future, the tfInnerBatchTxn flag
|
||||
* will need to be removed from this mask to allow Batch transaction to be inside
|
||||
* the sfRawTransactions array.
|
||||
*/
|
||||
constexpr std::uint32_t const tfBatchMask =
|
||||
~(tfUniversal | tfAllOrNothing | tfOnlyOne | tfUntilFailure | tfIndependent) | tfInnerBatchTxn;
|
||||
|
||||
// VaultClawback flags:
|
||||
constexpr std::uint32_t const tfVaultClawbackUnauth = 0x00010000;
|
||||
constexpr std::uint32_t const tfVaultClawbackMask = ~(tfUniversal | tfVaultClawbackUnauth);
|
||||
// clang-format on
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
@@ -59,7 +59,7 @@ enum TxType : std::uint16_t
|
||||
#pragma push_macro("TRANSACTION")
|
||||
#undef TRANSACTION
|
||||
|
||||
#define TRANSACTION(tag, value, name, delegatable, fields) tag = value,
|
||||
#define TRANSACTION(tag, value, name, fields) tag = value,
|
||||
|
||||
#include <xrpl/protocol/detail/transactions.macro>
|
||||
|
||||
|
||||
@@ -46,10 +46,7 @@ private:
|
||||
CtorHelper);
|
||||
|
||||
public:
|
||||
TxMeta(
|
||||
uint256 const& transactionID,
|
||||
std::uint32_t ledger,
|
||||
std::optional<uint256> parentBatchId = std::nullopt);
|
||||
TxMeta(uint256 const& transactionID, std::uint32_t ledger);
|
||||
TxMeta(uint256 const& txID, std::uint32_t ledger, Blob const&);
|
||||
TxMeta(uint256 const& txID, std::uint32_t ledger, std::string const&);
|
||||
TxMeta(uint256 const& txID, std::uint32_t ledger, STObject const&);
|
||||
@@ -133,27 +130,6 @@ public:
|
||||
return static_cast<bool>(mDelivered);
|
||||
}
|
||||
|
||||
void
|
||||
setParentBatchId(uint256 const& parentBatchId)
|
||||
{
|
||||
mParentBatchId = parentBatchId;
|
||||
}
|
||||
|
||||
uint256
|
||||
getParentBatchId() const
|
||||
{
|
||||
XRPL_ASSERT(
|
||||
hasParentBatchId(),
|
||||
"ripple::TxMeta::getParentBatchId : non-null batch id");
|
||||
return *mParentBatchId;
|
||||
}
|
||||
|
||||
bool
|
||||
hasParentBatchId() const
|
||||
{
|
||||
return static_cast<bool>(mParentBatchId);
|
||||
}
|
||||
|
||||
private:
|
||||
uint256 mTransactionID;
|
||||
std::uint32_t mLedger;
|
||||
@@ -161,7 +137,6 @@ private:
|
||||
int mResult;
|
||||
|
||||
std::optional<STAmount> mDelivered;
|
||||
std::optional<uint256> mParentBatchId;
|
||||
|
||||
STArray mNodes;
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -61,10 +61,8 @@ using NodeID = base_uint<160, detail::NodeIDTag>;
|
||||
/** MPTID is a 192-bit value representing MPT Issuance ID,
|
||||
* which is a concatenation of a 32-bit sequence (big endian)
|
||||
* and a 160-bit account */
|
||||
using MPTID = base_uint<192>;
|
||||
|
||||
/** Domain is a 256-bit hash representing a specific domain. */
|
||||
using Domain = base_uint<256>;
|
||||
// TODO - edhennis - Add a tag
|
||||
using MPTID = uint192;
|
||||
|
||||
/** XRP currency. */
|
||||
Currency const&
|
||||
@@ -122,25 +120,25 @@ namespace std {
|
||||
template <>
|
||||
struct hash<ripple::Currency> : ripple::Currency::hasher
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct hash<ripple::NodeID> : ripple::NodeID::hasher
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct hash<ripple::Directory> : ripple::Directory::hasher
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct hash<ripple::uint256> : ripple::uint256::hasher
|
||||
{
|
||||
hash() = default;
|
||||
explicit hash() = default;
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
@@ -267,7 +267,7 @@ XRPAmount::decimalXRP() const
|
||||
// Output XRPAmount as just the drops value.
|
||||
template <class Char, class Traits>
|
||||
std::basic_ostream<Char, Traits>&
|
||||
operator<<(std::basic_ostream<Char, Traits>& os, XRPAmount const& q)
|
||||
operator<<(std::basic_ostream<Char, Traits>& os, const XRPAmount& q)
|
||||
{
|
||||
return os << q.drops();
|
||||
}
|
||||
|
||||
@@ -26,23 +26,13 @@
|
||||
#if !defined(XRPL_RETIRE)
|
||||
#error "undefined macro: XRPL_RETIRE"
|
||||
#endif
|
||||
#if !defined(XRPL_ABANDON)
|
||||
#error "undefined macro: XRPL_ABANDON"
|
||||
#endif
|
||||
|
||||
// Add new amendments to the top of this list.
|
||||
// Keep it sorted in reverse chronological order.
|
||||
// If you add an amendment here, then do not forget to increment `numFeatures`
|
||||
// in include/xrpl/protocol/Feature.h.
|
||||
|
||||
XRPL_FEATURE(TokenEscrow, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FIX (EnforceNFTokenTrustlineV2, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FIX (AMMv1_3, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(PermissionedDEX, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(Batch, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(SingleAssetVault, Supported::no, VoteBehavior::DefaultNo)
|
||||
XRPL_FEATURE(PermissionDelegation, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FIX (PayChanCancelAfter, Supported::yes, VoteBehavior::DefaultNo)
|
||||
// Check flags in Credential transactions
|
||||
XRPL_FIX (InvalidTxFlags, Supported::yes, VoteBehavior::DefaultNo)
|
||||
XRPL_FIX (FrozenLPTokenTransfer, Supported::yes, VoteBehavior::DefaultNo)
|
||||
@@ -117,6 +107,7 @@ XRPL_FEATURE(DepositAuth, Supported::yes, VoteBehavior::DefaultYe
|
||||
XRPL_FIX (1513, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(FlowCross, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(Flow, Supported::yes, VoteBehavior::DefaultYes)
|
||||
XRPL_FEATURE(OwnerPaysFee, Supported::no, VoteBehavior::DefaultNo)
|
||||
|
||||
// The following amendments are obsolete, but must remain supported
|
||||
// because they could potentially get enabled.
|
||||
@@ -134,11 +125,6 @@ XRPL_FIX (NFTokenDirV1, Supported::yes, VoteBehavior::Obsolete)
|
||||
XRPL_FEATURE(NonFungibleTokensV1, Supported::yes, VoteBehavior::Obsolete)
|
||||
XRPL_FEATURE(CryptoConditionsSuite, Supported::yes, VoteBehavior::Obsolete)
|
||||
|
||||
// The following amendments were never supported, never enabled, and
|
||||
// we've abanded them. These features should never be in the ledger,
|
||||
// and we've removed all the related code.
|
||||
XRPL_ABANDON(OwnerPaysFee)
|
||||
|
||||
// The following amendments have been active for at least two years. Their
|
||||
// pre-amendment code has been removed and the identifiers are deprecated.
|
||||
// All known amendments and amendments that may appear in a validated
|
||||
|
||||
@@ -1,175 +0,0 @@
|
||||
|
||||
#if !defined(INNER_OBJECT)
|
||||
#error "undefined macro: INNER_OBJECT"
|
||||
#endif
|
||||
|
||||
#if !defined(FIELDS)
|
||||
#error "undefined macro: FIELDS"
|
||||
#endif
|
||||
|
||||
#if !defined(FIELD)
|
||||
#error "undefined macro: FIELD"
|
||||
#endif
|
||||
|
||||
#if !defined(INNER_OBJECT_BEGIN)
|
||||
#error "undefined macro: INNER_OBJECT_BEGIN"
|
||||
#endif
|
||||
|
||||
#if !defined(INNER_OBJECT_END)
|
||||
#error "undefined macro: INNER_OBJECT_END"
|
||||
#endif
|
||||
|
||||
INNER_OBJECT_BEGIN
|
||||
|
||||
INNER_OBJECT(sfSignerEntry,
|
||||
FIELDS(
|
||||
FIELD(sfSignerEntry, sfAccount, soeREQUIRED)
|
||||
FIELD(sfSignerEntry, sfSignerWeight, soeREQUIRED)
|
||||
FIELD(sfSignerEntry, sfWalletLocator, soeOPTIONAL)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfSigner,
|
||||
FIELDS(
|
||||
FIELD(sfSigner, sfAccount, soeREQUIRED)
|
||||
FIELD(sfSigner, sfSigningPubKey, soeREQUIRED)
|
||||
FIELD(sfSigner, sfTxnSignature, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfMajority,
|
||||
FIELDS(
|
||||
FIELD(sfMajority, sfAmendment, soeREQUIRED)
|
||||
FIELD(sfMajority, sfCloseTime, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfDisabledValidator,
|
||||
FIELDS(
|
||||
FIELD(sfDisabledValidator, sfPublicKey, soeREQUIRED)
|
||||
FIELD(sfDisabledValidator, sfFirstLedgerSequence, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfNFToken,
|
||||
FIELDS(
|
||||
FIELD(sfNFToken, sfNFTokenID, soeREQUIRED)
|
||||
FIELD(sfNFToken, sfURI, soeOPTIONAL)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfVoteEntry,
|
||||
FIELDS(
|
||||
FIELD(sfVoteEntry, sfAccount, soeREQUIRED)
|
||||
FIELD(sfVoteEntry, sfTradingFee, soeDEFAULT)
|
||||
FIELD(sfVoteEntry, sfVoteWeight, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfAuctionSlot,
|
||||
FIELDS(
|
||||
FIELD(sfAuctionSlot, sfAccount, soeREQUIRED)
|
||||
FIELD(sfAuctionSlot, sfExpiration, soeREQUIRED)
|
||||
FIELD(sfAuctionSlot, sfDiscountedFee, soeDEFAULT)
|
||||
FIELD(sfAuctionSlot, sfPrice, soeREQUIRED)
|
||||
FIELD(sfAuctionSlot, sfAuthAccounts, soeOPTIONAL)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfXChainClaimAttestationCollectionElement,
|
||||
FIELDS(
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfAttestationSignerAccount, soeREQUIRED)
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfPublicKey, soeREQUIRED)
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfSignature, soeREQUIRED)
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfAmount, soeREQUIRED)
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfAccount, soeREQUIRED)
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfAttestationRewardAccount, soeREQUIRED)
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfWasLockingChainSend, soeREQUIRED)
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfXChainClaimID, soeREQUIRED)
|
||||
FIELD(sfXChainClaimAttestationCollectionElement, sfDestination, soeOPTIONAL)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfXChainCreateAccountAttestationCollectionElement,
|
||||
FIELDS(
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfAttestationSignerAccount, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfPublicKey, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfSignature, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfAmount, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfAccount, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfAttestationRewardAccount, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfWasLockingChainSend, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfXChainAccountCreateCount, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfDestination, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountAttestationCollectionElement, sfSignatureReward, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfXChainClaimProofSig,
|
||||
FIELDS(
|
||||
FIELD(sfXChainClaimProofSig, sfAttestationSignerAccount, soeREQUIRED)
|
||||
FIELD(sfXChainClaimProofSig, sfPublicKey, soeREQUIRED)
|
||||
FIELD(sfXChainClaimProofSig, sfAmount, soeREQUIRED)
|
||||
FIELD(sfXChainClaimProofSig, sfAttestationRewardAccount, soeREQUIRED)
|
||||
FIELD(sfXChainClaimProofSig, sfWasLockingChainSend, soeREQUIRED)
|
||||
FIELD(sfXChainClaimProofSig, sfDestination, soeOPTIONAL)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfXChainCreateAccountProofSig,
|
||||
FIELDS(
|
||||
FIELD(sfXChainCreateAccountProofSig, sfAttestationSignerAccount, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountProofSig, sfPublicKey, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountProofSig, sfAmount, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountProofSig, sfSignatureReward, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountProofSig, sfAttestationRewardAccount, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountProofSig, sfWasLockingChainSend, soeREQUIRED)
|
||||
FIELD(sfXChainCreateAccountProofSig, sfDestination, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfAuthAccount,
|
||||
FIELDS(
|
||||
FIELD(sfAuthAccount, sfAccount, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfPriceData,
|
||||
FIELDS(
|
||||
FIELD(sfPriceData, sfBaseAsset, soeREQUIRED)
|
||||
FIELD(sfPriceData, sfQuoteAsset, soeREQUIRED)
|
||||
FIELD(sfPriceData, sfAssetPrice, soeOPTIONAL)
|
||||
FIELD(sfPriceData, sfScale, soeDEFAULT)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfCredential,
|
||||
FIELDS(
|
||||
FIELD(sfCredential, sfIssuer, soeREQUIRED)
|
||||
FIELD(sfCredential, sfCredentialType, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfPermission,
|
||||
FIELDS(
|
||||
FIELD(sfPermission, sfPermissionValue, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfBatchSigner,
|
||||
FIELDS(
|
||||
FIELD(sfBatchSigner, sfAccount, soeREQUIRED)
|
||||
FIELD(sfBatchSigner, sfSigningPubKey, soeOPTIONAL)
|
||||
FIELD(sfBatchSigner, sfTxnSignature, soeOPTIONAL)
|
||||
FIELD(sfBatchSigner, sfSigners, soeOPTIONAL)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT(sfBook,
|
||||
FIELDS(
|
||||
FIELD(sfBook, sfBookDirectory, soeREQUIRED)
|
||||
FIELD(sfBook, sfBookNode, soeREQUIRED)
|
||||
)
|
||||
)
|
||||
|
||||
INNER_OBJECT_END
|
||||
@@ -21,22 +21,6 @@
|
||||
#error "undefined macro: LEDGER_ENTRY"
|
||||
#endif
|
||||
|
||||
#if !defined(LEDGER_ENTRY_FIELD)
|
||||
#error "undefined macro: LEDGER_ENTRY_FIELD"
|
||||
#endif
|
||||
|
||||
#if !defined(DEFINE_LEDGER_ENTRY_FIELDS)
|
||||
#error "undefined macro: DEFINE_LEDGER_ENTRY_FIELDS"
|
||||
#endif
|
||||
|
||||
#if !defined(LEDGER_ENTRIES_BEGIN)
|
||||
#error "undefined macro: LEDGER_ENTRIES_BEGIN"
|
||||
#endif
|
||||
|
||||
#if !defined(LEDGER_ENTRIES_END)
|
||||
#error "undefined macro: LEDGER_ENTRIES_END"
|
||||
#endif
|
||||
|
||||
#ifndef LEDGER_ENTRY_DUPLICATE
|
||||
// The EXPAND macro is needed for Windows
|
||||
// https://stackoverflow.com/questions/5134523/msvc-doesnt-expand-va-args-correctly
|
||||
@@ -48,8 +32,6 @@
|
||||
#define LEDGER_ENTRY_DUPLICATE(...) EXPAND(LEDGER_ENTRY(__VA_ARGS__))
|
||||
#endif
|
||||
|
||||
LEDGER_ENTRIES_BEGIN
|
||||
|
||||
/**
|
||||
* These objects are listed in order of increasing ledger type ID.
|
||||
* There are many gaps between these IDs.
|
||||
@@ -60,50 +42,50 @@ LEDGER_ENTRIES_BEGIN
|
||||
|
||||
\sa keylet::nftoffer
|
||||
*/
|
||||
LEDGER_ENTRY(ltNFTOKEN_OFFER, 0x0037, NFTokenOffer, nft_offer, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfOwner, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfNFTokenID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAmount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfNFTokenOfferNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDestination, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfExpiration, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltNFTOKEN_OFFER, 0x0037, NFTokenOffer, nft_offer, ({
|
||||
{sfOwner, soeREQUIRED},
|
||||
{sfNFTokenID, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfNFTokenOfferNode, soeREQUIRED},
|
||||
{sfDestination, soeOPTIONAL},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which describes a check.
|
||||
|
||||
\sa keylet::check
|
||||
*/
|
||||
LEDGER_ENTRY(ltCHECK, 0x0043, Check, check, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDestination, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSendMax, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSequence, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDestinationNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfExpiration, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfInvoiceID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfSourceTag, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfDestinationTag, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltCHECK, 0x0043, Check, check, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfSendMax, soeREQUIRED},
|
||||
{sfSequence, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfDestinationNode, soeREQUIRED},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
{sfInvoiceID, soeOPTIONAL},
|
||||
{sfSourceTag, soeOPTIONAL},
|
||||
{sfDestinationTag, soeOPTIONAL},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** The ledger object which tracks the DID.
|
||||
|
||||
\sa keylet::did
|
||||
*/
|
||||
LEDGER_ENTRY(ltDID, 0x0049, DID, did, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDIDDocument, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfURI, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfData, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltDID, 0x0049, DID, did, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfDIDDocument, soeOPTIONAL},
|
||||
{sfURI, soeOPTIONAL},
|
||||
{sfData, soeOPTIONAL},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** The ledger object which tracks the current negative UNL state.
|
||||
|
||||
@@ -111,25 +93,25 @@ LEDGER_ENTRY(ltDID, 0x0049, DID, did, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
|
||||
\sa keylet::negativeUNL
|
||||
*/
|
||||
LEDGER_ENTRY(ltNEGATIVE_UNL, 0x004e, NegativeUNL, nunl, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfDisabledValidators, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfValidatorToDisable, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfValidatorToReEnable, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltNEGATIVE_UNL, 0x004e, NegativeUNL, nunl, ({
|
||||
{sfDisabledValidators, soeOPTIONAL},
|
||||
{sfValidatorToDisable, soeOPTIONAL},
|
||||
{sfValidatorToReEnable, soeOPTIONAL},
|
||||
{sfPreviousTxnID, soeOPTIONAL},
|
||||
{sfPreviousTxnLgrSeq, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A ledger object which contains a list of NFTs
|
||||
|
||||
\sa keylet::nftpage_min, keylet::nftpage_max, keylet::nftpage
|
||||
*/
|
||||
LEDGER_ENTRY(ltNFTOKEN_PAGE, 0x0050, NFTokenPage, nft_page, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfPreviousPageMin, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfNextPageMin, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfNFTokens, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltNFTOKEN_PAGE, 0x0050, NFTokenPage, nft_page, ({
|
||||
{sfPreviousPageMin, soeOPTIONAL},
|
||||
{sfNextPageMin, soeOPTIONAL},
|
||||
{sfNFTokens, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which contains a signer list for an account.
|
||||
|
||||
@@ -137,77 +119,76 @@ LEDGER_ENTRY(ltNFTOKEN_PAGE, 0x0050, NFTokenPage, nft_page, DEFINE_LEDGER_ENTRY_
|
||||
*/
|
||||
// All fields are soeREQUIRED because there is always a SignerEntries.
|
||||
// If there are no SignerEntries the node is deleted.
|
||||
LEDGER_ENTRY(ltSIGNER_LIST, 0x0053, SignerList, signer_list, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSignerQuorum, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSignerEntries, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSignerListID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltSIGNER_LIST, 0x0053, SignerList, signer_list, ({
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfSignerQuorum, soeREQUIRED},
|
||||
{sfSignerEntries, soeREQUIRED},
|
||||
{sfSignerListID, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which describes a ticket.
|
||||
|
||||
\sa keylet::ticket
|
||||
*/
|
||||
LEDGER_ENTRY(ltTICKET, 0x0054, Ticket, ticket, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfTicketSequence, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltTICKET, 0x0054, Ticket, ticket, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfTicketSequence, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which describes an account.
|
||||
|
||||
\sa keylet::account
|
||||
*/
|
||||
LEDGER_ENTRY(ltACCOUNT_ROOT, 0x0061, AccountRoot, account, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSequence, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfBalance, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerCount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAccountTxnID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfRegularKey, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfEmailHash, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfWalletLocator, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfWalletSize, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfMessageKey, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfTransferRate, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfDomain, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfTickSize, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfTicketCount, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfNFTokenMinter, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfMintedNFTokens, soeDEFAULT)
|
||||
LEDGER_ENTRY_FIELD(sfBurnedNFTokens, soeDEFAULT)
|
||||
LEDGER_ENTRY_FIELD(sfFirstNFTokenSequence, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfAMMID, soeOPTIONAL) // pseudo-account designator
|
||||
LEDGER_ENTRY_FIELD(sfVaultID, soeOPTIONAL) // pseudo-account designator
|
||||
))
|
||||
LEDGER_ENTRY(ltACCOUNT_ROOT, 0x0061, AccountRoot, account, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfSequence, soeREQUIRED},
|
||||
{sfBalance, soeREQUIRED},
|
||||
{sfOwnerCount, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfAccountTxnID, soeOPTIONAL},
|
||||
{sfRegularKey, soeOPTIONAL},
|
||||
{sfEmailHash, soeOPTIONAL},
|
||||
{sfWalletLocator, soeOPTIONAL},
|
||||
{sfWalletSize, soeOPTIONAL},
|
||||
{sfMessageKey, soeOPTIONAL},
|
||||
{sfTransferRate, soeOPTIONAL},
|
||||
{sfDomain, soeOPTIONAL},
|
||||
{sfTickSize, soeOPTIONAL},
|
||||
{sfTicketCount, soeOPTIONAL},
|
||||
{sfNFTokenMinter, soeOPTIONAL},
|
||||
{sfMintedNFTokens, soeDEFAULT},
|
||||
{sfBurnedNFTokens, soeDEFAULT},
|
||||
{sfFirstNFTokenSequence, soeOPTIONAL},
|
||||
{sfAMMID, soeOPTIONAL}, // pseudo-account designator
|
||||
{sfVaultID, soeOPTIONAL}, // pseudo-account designator
|
||||
}))
|
||||
|
||||
/** A ledger object which contains a list of object identifiers.
|
||||
|
||||
\sa keylet::page, keylet::quality, keylet::book, keylet::next and
|
||||
keylet::ownerDir
|
||||
*/
|
||||
LEDGER_ENTRY(ltDIR_NODE, 0x0064, DirectoryNode, directory, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfOwner, soeOPTIONAL) // for owner directories
|
||||
LEDGER_ENTRY_FIELD(sfTakerPaysCurrency, soeOPTIONAL) // order book directories
|
||||
LEDGER_ENTRY_FIELD(sfTakerPaysIssuer, soeOPTIONAL) // order book directories
|
||||
LEDGER_ENTRY_FIELD(sfTakerGetsCurrency, soeOPTIONAL) // order book directories
|
||||
LEDGER_ENTRY_FIELD(sfTakerGetsIssuer, soeOPTIONAL) // order book directories
|
||||
LEDGER_ENTRY_FIELD(sfExchangeRate, soeOPTIONAL) // order book directories
|
||||
LEDGER_ENTRY_FIELD(sfIndexes, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfRootIndex, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfIndexNext, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfIndexPrevious, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfNFTokenID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfDomainID, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltDIR_NODE, 0x0064, DirectoryNode, directory, ({
|
||||
{sfOwner, soeOPTIONAL}, // for owner directories
|
||||
{sfTakerPaysCurrency, soeOPTIONAL}, // order book directories
|
||||
{sfTakerPaysIssuer, soeOPTIONAL}, // order book directories
|
||||
{sfTakerGetsCurrency, soeOPTIONAL}, // order book directories
|
||||
{sfTakerGetsIssuer, soeOPTIONAL}, // order book directories
|
||||
{sfExchangeRate, soeOPTIONAL}, // order book directories
|
||||
{sfIndexes, soeREQUIRED},
|
||||
{sfRootIndex, soeREQUIRED},
|
||||
{sfIndexNext, soeOPTIONAL},
|
||||
{sfIndexPrevious, soeOPTIONAL},
|
||||
{sfNFTokenID, soeOPTIONAL},
|
||||
{sfPreviousTxnID, soeOPTIONAL},
|
||||
{sfPreviousTxnLgrSeq, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** The ledger object which lists details about amendments on the network.
|
||||
|
||||
@@ -215,12 +196,12 @@ LEDGER_ENTRY(ltDIR_NODE, 0x0064, DirectoryNode, directory, DEFINE_LEDGER_ENTRY_F
|
||||
|
||||
\sa keylet::amendments
|
||||
*/
|
||||
LEDGER_ENTRY(ltAMENDMENTS, 0x0066, Amendments, amendments, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAmendments, soeOPTIONAL) // Enabled
|
||||
LEDGER_ENTRY_FIELD(sfMajorities, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltAMENDMENTS, 0x0066, Amendments, amendments, ({
|
||||
{sfAmendments, soeOPTIONAL}, // Enabled
|
||||
{sfMajorities, soeOPTIONAL},
|
||||
{sfPreviousTxnID, soeOPTIONAL},
|
||||
{sfPreviousTxnLgrSeq, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A ledger object that contains a list of ledger hashes.
|
||||
|
||||
@@ -230,76 +211,74 @@ LEDGER_ENTRY(ltAMENDMENTS, 0x0066, Amendments, amendments, DEFINE_LEDGER_ENTRY_F
|
||||
|
||||
\sa keylet::skip
|
||||
*/
|
||||
LEDGER_ENTRY(ltLEDGER_HASHES, 0x0068, LedgerHashes, hashes, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfFirstLedgerSequence, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfLastLedgerSequence, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfHashes, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltLEDGER_HASHES, 0x0068, LedgerHashes, hashes, ({
|
||||
{sfFirstLedgerSequence, soeOPTIONAL},
|
||||
{sfLastLedgerSequence, soeOPTIONAL},
|
||||
{sfHashes, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** The ledger object which lists details about sidechains.
|
||||
|
||||
\sa keylet::bridge
|
||||
*/
|
||||
LEDGER_ENTRY(ltBRIDGE, 0x0069, Bridge, bridge, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSignatureReward, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfMinAccountCreateAmount, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfXChainBridge, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainClaimID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainAccountCreateCount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainAccountClaimCount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltBRIDGE, 0x0069, Bridge, bridge, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfSignatureReward, soeREQUIRED},
|
||||
{sfMinAccountCreateAmount, soeOPTIONAL},
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfXChainClaimID, soeREQUIRED},
|
||||
{sfXChainAccountCreateCount, soeREQUIRED},
|
||||
{sfXChainAccountClaimCount, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which describes an offer on the DEX.
|
||||
|
||||
\sa keylet::offer
|
||||
*/
|
||||
LEDGER_ENTRY(ltOFFER, 0x006f, Offer, offer, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSequence, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfTakerPays, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfTakerGets, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfBookDirectory, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfBookNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfExpiration, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfDomainID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfAdditionalBooks, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltOFFER, 0x006f, Offer, offer, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfSequence, soeREQUIRED},
|
||||
{sfTakerPays, soeREQUIRED},
|
||||
{sfTakerGets, soeREQUIRED},
|
||||
{sfBookDirectory, soeREQUIRED},
|
||||
{sfBookNode, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A ledger object which describes a deposit preauthorization.
|
||||
|
||||
\sa keylet::depositPreauth
|
||||
*/
|
||||
LEDGER_ENTRY_DUPLICATE(ltDEPOSIT_PREAUTH, 0x0070, DepositPreauth, deposit_preauth, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAuthorize, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAuthorizeCredentials, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY_DUPLICATE(ltDEPOSIT_PREAUTH, 0x0070, DepositPreauth, deposit_preauth, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfAuthorize, soeOPTIONAL},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfAuthorizeCredentials, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A claim id for a cross chain transaction.
|
||||
|
||||
\sa keylet::xChainClaimID
|
||||
*/
|
||||
LEDGER_ENTRY(ltXCHAIN_OWNED_CLAIM_ID, 0x0071, XChainOwnedClaimID, xchain_owned_claim_id, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainBridge, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainClaimID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOtherChainSource, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainClaimAttestations, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSignatureReward, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltXCHAIN_OWNED_CLAIM_ID, 0x0071, XChainOwnedClaimID, xchain_owned_claim_id, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfXChainClaimID, soeREQUIRED},
|
||||
{sfOtherChainSource, soeREQUIRED},
|
||||
{sfXChainClaimAttestations, soeREQUIRED},
|
||||
{sfSignatureReward, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which describes a bidirectional trust line.
|
||||
|
||||
@@ -307,19 +286,19 @@ LEDGER_ENTRY(ltXCHAIN_OWNED_CLAIM_ID, 0x0071, XChainOwnedClaimID, xchain_owned_c
|
||||
|
||||
\sa keylet::line
|
||||
*/
|
||||
LEDGER_ENTRY(ltRIPPLE_STATE, 0x0072, RippleState, state, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfBalance, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfLowLimit, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfHighLimit, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfLowNode, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfLowQualityIn, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfLowQualityOut, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfHighNode, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfHighQualityIn, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfHighQualityOut, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltRIPPLE_STATE, 0x0072, RippleState, state, ({
|
||||
{sfBalance, soeREQUIRED},
|
||||
{sfLowLimit, soeREQUIRED},
|
||||
{sfHighLimit, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfLowNode, soeOPTIONAL},
|
||||
{sfLowQualityIn, soeOPTIONAL},
|
||||
{sfLowQualityOut, soeOPTIONAL},
|
||||
{sfHighNode, soeOPTIONAL},
|
||||
{sfHighQualityIn, soeOPTIONAL},
|
||||
{sfHighQualityOut, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** The ledger object which lists the network's fee settings.
|
||||
|
||||
@@ -327,202 +306,185 @@ LEDGER_ENTRY(ltRIPPLE_STATE, 0x0072, RippleState, state, DEFINE_LEDGER_ENTRY_FIE
|
||||
|
||||
\sa keylet::fees
|
||||
*/
|
||||
LEDGER_ENTRY(ltFEE_SETTINGS, 0x0073, FeeSettings, fee, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY(ltFEE_SETTINGS, 0x0073, FeeSettings, fee, ({
|
||||
// Old version uses raw numbers
|
||||
LEDGER_ENTRY_FIELD(sfBaseFee, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfReferenceFeeUnits, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfReserveBase, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfReserveIncrement, soeOPTIONAL)
|
||||
{sfBaseFee, soeOPTIONAL},
|
||||
{sfReferenceFeeUnits, soeOPTIONAL},
|
||||
{sfReserveBase, soeOPTIONAL},
|
||||
{sfReserveIncrement, soeOPTIONAL},
|
||||
// New version uses Amounts
|
||||
LEDGER_ENTRY_FIELD(sfBaseFeeDrops, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfReserveBaseDrops, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfReserveIncrementDrops, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeOPTIONAL)
|
||||
))
|
||||
{sfBaseFeeDrops, soeOPTIONAL},
|
||||
{sfReserveBaseDrops, soeOPTIONAL},
|
||||
{sfReserveIncrementDrops, soeOPTIONAL},
|
||||
{sfPreviousTxnID, soeOPTIONAL},
|
||||
{sfPreviousTxnLgrSeq, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A claim id for a cross chain create account transaction.
|
||||
|
||||
\sa keylet::xChainCreateAccountClaimID
|
||||
*/
|
||||
LEDGER_ENTRY(ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID, 0x0074, XChainOwnedCreateAccountClaimID, xchain_owned_create_account_claim_id, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainBridge, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainAccountCreateCount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfXChainCreateAccountAttestations, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID, 0x0074, XChainOwnedCreateAccountClaimID, xchain_owned_create_account_claim_id, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfXChainAccountCreateCount, soeREQUIRED},
|
||||
{sfXChainCreateAccountAttestations, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object describing a single escrow.
|
||||
|
||||
\sa keylet::escrow
|
||||
*/
|
||||
LEDGER_ENTRY(ltESCROW, 0x0075, Escrow, escrow, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDestination, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAmount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfCondition, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfCancelAfter, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfFinishAfter, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfSourceTag, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfDestinationTag, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDestinationNode, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfTransferRate, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfIssuerNode, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltESCROW, 0x0075, Escrow, escrow, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED},
|
||||
{sfCondition, soeOPTIONAL},
|
||||
{sfCancelAfter, soeOPTIONAL},
|
||||
{sfFinishAfter, soeOPTIONAL},
|
||||
{sfSourceTag, soeOPTIONAL},
|
||||
{sfDestinationTag, soeOPTIONAL},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfDestinationNode, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A ledger object describing a single unidirectional XRP payment channel.
|
||||
|
||||
\sa keylet::payChan
|
||||
*/
|
||||
LEDGER_ENTRY(ltPAYCHAN, 0x0078, PayChannel, payment_channel, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDestination, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAmount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfBalance, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPublicKey, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSettleDelay, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfExpiration, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfCancelAfter, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfSourceTag, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfDestinationTag, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDestinationNode, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltPAYCHAN, 0x0078, PayChannel, payment_channel, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED},
|
||||
{sfBalance, soeREQUIRED},
|
||||
{sfPublicKey, soeREQUIRED},
|
||||
{sfSettleDelay, soeREQUIRED},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
{sfCancelAfter, soeOPTIONAL},
|
||||
{sfSourceTag, soeOPTIONAL},
|
||||
{sfDestinationTag, soeOPTIONAL},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfDestinationNode, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** The ledger object which tracks the AMM.
|
||||
|
||||
\sa keylet::amm
|
||||
*/
|
||||
LEDGER_ENTRY(ltAMM, 0x0079, AMM, amm, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfTradingFee, soeDEFAULT)
|
||||
LEDGER_ENTRY_FIELD(sfVoteSlots, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfAuctionSlot, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfLPTokenBalance, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAsset, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAsset2, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltAMM, 0x0079, AMM, amm, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfTradingFee, soeDEFAULT},
|
||||
{sfVoteSlots, soeOPTIONAL},
|
||||
{sfAuctionSlot, soeOPTIONAL},
|
||||
{sfLPTokenBalance, soeREQUIRED},
|
||||
{sfAsset, soeREQUIRED},
|
||||
{sfAsset2, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeOPTIONAL},
|
||||
{sfPreviousTxnLgrSeq, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A ledger object which tracks MPTokenIssuance
|
||||
\sa keylet::mptIssuance
|
||||
*/
|
||||
LEDGER_ENTRY(ltMPTOKEN_ISSUANCE, 0x007e, MPTokenIssuance, mpt_issuance, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfIssuer, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSequence, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfTransferFee, soeDEFAULT)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAssetScale, soeDEFAULT)
|
||||
LEDGER_ENTRY_FIELD(sfMaximumAmount, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfOutstandingAmount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfLockedAmount, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfMPTokenMetadata, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfDomainID, soeOPTIONAL)
|
||||
))
|
||||
LEDGER_ENTRY(ltMPTOKEN_ISSUANCE, 0x007e, MPTokenIssuance, mpt_issuance, ({
|
||||
{sfIssuer, soeREQUIRED},
|
||||
{sfSequence, soeREQUIRED},
|
||||
{sfTransferFee, soeDEFAULT},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfAssetScale, soeDEFAULT},
|
||||
{sfMaximumAmount, soeOPTIONAL},
|
||||
{sfOutstandingAmount, soeREQUIRED},
|
||||
{sfMPTokenMetadata, soeOPTIONAL},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfDomainID, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** A ledger object which tracks MPToken
|
||||
\sa keylet::mptoken
|
||||
*/
|
||||
LEDGER_ENTRY(ltMPTOKEN, 0x007f, MPToken, mptoken, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfMPTokenIssuanceID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfMPTAmount, soeDEFAULT)
|
||||
LEDGER_ENTRY_FIELD(sfLockedAmount, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltMPTOKEN, 0x007f, MPToken, mptoken, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfMPTokenIssuanceID, soeREQUIRED},
|
||||
{sfMPTAmount, soeDEFAULT},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which tracks Oracle
|
||||
\sa keylet::oracle
|
||||
*/
|
||||
LEDGER_ENTRY(ltORACLE, 0x0080, Oracle, oracle, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfOwner, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfProvider, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPriceDataSeries, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAssetClass, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfLastUpdateTime, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfURI, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltORACLE, 0x0080, Oracle, oracle, ({
|
||||
{sfOwner, soeREQUIRED},
|
||||
{sfProvider, soeREQUIRED},
|
||||
{sfPriceDataSeries, soeREQUIRED},
|
||||
{sfAssetClass, soeREQUIRED},
|
||||
{sfLastUpdateTime, soeREQUIRED},
|
||||
{sfURI, soeOPTIONAL},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which tracks Credential
|
||||
\sa keylet::credential
|
||||
*/
|
||||
LEDGER_ENTRY(ltCREDENTIAL, 0x0081, Credential, credential, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfSubject, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfIssuer, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfCredentialType, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfExpiration, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfURI, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfIssuerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSubjectNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltCREDENTIAL, 0x0081, Credential, credential, ({
|
||||
{sfSubject, soeREQUIRED},
|
||||
{sfIssuer, soeREQUIRED},
|
||||
{sfCredentialType, soeREQUIRED},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
{sfURI, soeOPTIONAL},
|
||||
{sfIssuerNode, soeREQUIRED},
|
||||
{sfSubjectNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object which tracks PermissionedDomain
|
||||
\sa keylet::permissionedDomain
|
||||
*/
|
||||
LEDGER_ENTRY(ltPERMISSIONED_DOMAIN, 0x0082, PermissionedDomain, permissioned_domain, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfOwner, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSequence, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAcceptedCredentials, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
|
||||
/** A ledger object representing permissions an account has delegated to another account.
|
||||
\sa keylet::delegate
|
||||
*/
|
||||
LEDGER_ENTRY(ltDELEGATE, 0x0083, Delegate, delegate, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAuthorize, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPermissions, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
))
|
||||
LEDGER_ENTRY(ltPERMISSIONED_DOMAIN, 0x0082, PermissionedDomain, permissioned_domain, ({
|
||||
{sfOwner, soeREQUIRED},
|
||||
{sfSequence, soeREQUIRED},
|
||||
{sfAcceptedCredentials, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** A ledger object representing a single asset vault.
|
||||
|
||||
\sa keylet::mptoken
|
||||
*/
|
||||
LEDGER_ENTRY(ltVAULT, 0x0084, Vault, vault, DEFINE_LEDGER_ENTRY_FIELDS(
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfPreviousTxnLgrSeq, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfSequence, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwnerNode, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfOwner, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAccount, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfData, soeOPTIONAL)
|
||||
LEDGER_ENTRY_FIELD(sfAsset, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAssetsTotal, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAssetsAvailable, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfAssetsMaximum, soeDEFAULT)
|
||||
LEDGER_ENTRY_FIELD(sfLossUnrealized, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfShareMPTID, soeREQUIRED)
|
||||
LEDGER_ENTRY_FIELD(sfWithdrawalPolicy, soeREQUIRED)
|
||||
LEDGER_ENTRY(ltVAULT, 0x0083, Vault, vault, ({
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfSequence, soeREQUIRED},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfOwner, soeREQUIRED},
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfData, soeOPTIONAL},
|
||||
{sfAsset, soeREQUIRED},
|
||||
{sfAssetsTotal, soeREQUIRED},
|
||||
{sfAssetsAvailable, soeREQUIRED},
|
||||
{sfAssetsMaximum, soeDEFAULT},
|
||||
{sfLossUnrealized, soeREQUIRED},
|
||||
{sfShareMPTID, soeREQUIRED},
|
||||
{sfWithdrawalPolicy, soeREQUIRED},
|
||||
// no SharesTotal ever (use MPTIssuance.sfOutstandingAmount)
|
||||
// no PermissionedDomainID ever (use MPTIssuance.sfDomainID)
|
||||
))
|
||||
}))
|
||||
|
||||
#undef EXPAND
|
||||
#undef LEDGER_ENTRY_DUPLICATE
|
||||
|
||||
LEDGER_ENTRIES_END
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of rippled: https://github.com/ripple/rippled
|
||||
Copyright (c) 2025 Ripple Labs Inc.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#if !defined(PERMISSION)
|
||||
#error "undefined macro: PERMISSION"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* PERMISSION(name, type, txType, value)
|
||||
*
|
||||
* This macro defines a permission:
|
||||
* name: the name of the permission.
|
||||
* type: the GranularPermissionType enum.
|
||||
* txType: the corresponding TxType for this permission.
|
||||
* value: the uint32 numeric value for the enum type.
|
||||
*/
|
||||
|
||||
/** This permission grants the delegated account the ability to authorize a trustline. */
|
||||
PERMISSION(TrustlineAuthorize, ttTRUST_SET, 65537)
|
||||
|
||||
/** This permission grants the delegated account the ability to freeze a trustline. */
|
||||
PERMISSION(TrustlineFreeze, ttTRUST_SET, 65538)
|
||||
|
||||
/** This permission grants the delegated account the ability to unfreeze a trustline. */
|
||||
PERMISSION(TrustlineUnfreeze, ttTRUST_SET, 65539)
|
||||
|
||||
/** This permission grants the delegated account the ability to set Domain. */
|
||||
PERMISSION(AccountDomainSet, ttACCOUNT_SET, 65540)
|
||||
|
||||
/** This permission grants the delegated account the ability to set EmailHashSet. */
|
||||
PERMISSION(AccountEmailHashSet, ttACCOUNT_SET, 65541)
|
||||
|
||||
/** This permission grants the delegated account the ability to set MessageKey. */
|
||||
PERMISSION(AccountMessageKeySet, ttACCOUNT_SET, 65542)
|
||||
|
||||
/** This permission grants the delegated account the ability to set TransferRate. */
|
||||
PERMISSION(AccountTransferRateSet, ttACCOUNT_SET, 65543)
|
||||
|
||||
/** This permission grants the delegated account the ability to set TickSize. */
|
||||
PERMISSION(AccountTickSizeSet, ttACCOUNT_SET, 65544)
|
||||
|
||||
/** This permission grants the delegated account the ability to mint payment, which means sending a payment for a currency where the sending account is the issuer. */
|
||||
PERMISSION(PaymentMint, ttPAYMENT, 65545)
|
||||
|
||||
/** This permission grants the delegated account the ability to burn payment, which means sending a payment for a currency where the destination account is the issuer */
|
||||
PERMISSION(PaymentBurn, ttPAYMENT, 65546)
|
||||
|
||||
/** This permission grants the delegated account the ability to lock MPToken. */
|
||||
PERMISSION(MPTokenIssuanceLock, ttMPTOKEN_ISSUANCE_SET, 65547)
|
||||
|
||||
/** This permission grants the delegated account the ability to unlock MPToken. */
|
||||
PERMISSION(MPTokenIssuanceUnlock, ttMPTOKEN_ISSUANCE_SET, 65548)
|
||||
@@ -23,9 +23,6 @@
|
||||
#if !defined(TYPED_SFIELD)
|
||||
#error "undefined macro: TYPED_SFIELD"
|
||||
#endif
|
||||
#if !defined(ARRAY_SFIELD)
|
||||
#error "undefined macro: ARRAY_SFIELD"
|
||||
#endif
|
||||
|
||||
// untyped
|
||||
UNTYPED_SFIELD(sfLedgerEntry, LEDGERENTRY, 257)
|
||||
@@ -116,7 +113,6 @@ TYPED_SFIELD(sfEmitGeneration, UINT32, 46)
|
||||
TYPED_SFIELD(sfVoteWeight, UINT32, 48)
|
||||
TYPED_SFIELD(sfFirstNFTokenSequence, UINT32, 50)
|
||||
TYPED_SFIELD(sfOracleDocumentID, UINT32, 51)
|
||||
TYPED_SFIELD(sfPermissionValue, UINT32, 52)
|
||||
|
||||
// 64-bit integers (common)
|
||||
TYPED_SFIELD(sfIndexNext, UINT64, 1)
|
||||
@@ -147,7 +143,6 @@ TYPED_SFIELD(sfOutstandingAmount, UINT64, 25, SField::sMD_BaseTen|SFie
|
||||
TYPED_SFIELD(sfMPTAmount, UINT64, 26, SField::sMD_BaseTen|SField::sMD_Default)
|
||||
TYPED_SFIELD(sfIssuerNode, UINT64, 27)
|
||||
TYPED_SFIELD(sfSubjectNode, UINT64, 28)
|
||||
TYPED_SFIELD(sfLockedAmount, UINT64, 29, SField::sMD_BaseTen|SField::sMD_Default)
|
||||
|
||||
// 128-bit
|
||||
TYPED_SFIELD(sfEmailHash, UINT128, 1)
|
||||
@@ -199,13 +194,12 @@ TYPED_SFIELD(sfHookNamespace, UINT256, 32)
|
||||
TYPED_SFIELD(sfHookSetTxnID, UINT256, 33)
|
||||
TYPED_SFIELD(sfDomainID, UINT256, 34)
|
||||
TYPED_SFIELD(sfVaultID, UINT256, 35)
|
||||
TYPED_SFIELD(sfParentBatchID, UINT256, 36)
|
||||
|
||||
// number (common)
|
||||
TYPED_SFIELD(sfNumber, NUMBER, 1)
|
||||
TYPED_SFIELD(sfAssetsAvailable, NUMBER, 2)
|
||||
TYPED_SFIELD(sfAssetsMaximum, NUMBER, 3)
|
||||
TYPED_SFIELD(sfAssetsTotal, NUMBER, 4)
|
||||
TYPED_SFIELD(sfAssetsAvailable, NUMBER, 2)
|
||||
TYPED_SFIELD(sfAssetsMaximum, NUMBER, 3)
|
||||
TYPED_SFIELD(sfAssetsTotal, NUMBER, 4)
|
||||
TYPED_SFIELD(sfLossUnrealized, NUMBER, 5)
|
||||
|
||||
// currency amount (common)
|
||||
@@ -291,7 +285,6 @@ TYPED_SFIELD(sfRegularKey, ACCOUNT, 8)
|
||||
TYPED_SFIELD(sfNFTokenMinter, ACCOUNT, 9)
|
||||
TYPED_SFIELD(sfEmitCallback, ACCOUNT, 10)
|
||||
TYPED_SFIELD(sfHolder, ACCOUNT, 11)
|
||||
TYPED_SFIELD(sfDelegate, ACCOUNT, 12)
|
||||
|
||||
// account (uncommon)
|
||||
TYPED_SFIELD(sfHookAccount, ACCOUNT, 16)
|
||||
@@ -341,7 +334,6 @@ UNTYPED_SFIELD(sfSignerEntry, OBJECT, 11)
|
||||
UNTYPED_SFIELD(sfNFToken, OBJECT, 12)
|
||||
UNTYPED_SFIELD(sfEmitDetails, OBJECT, 13)
|
||||
UNTYPED_SFIELD(sfHook, OBJECT, 14)
|
||||
UNTYPED_SFIELD(sfPermission, OBJECT, 15)
|
||||
|
||||
// inner object (uncommon)
|
||||
UNTYPED_SFIELD(sfSigner, OBJECT, 16)
|
||||
@@ -362,40 +354,33 @@ UNTYPED_SFIELD(sfXChainClaimAttestationCollectionElement, OBJECT, 30)
|
||||
UNTYPED_SFIELD(sfXChainCreateAccountAttestationCollectionElement, OBJECT, 31)
|
||||
UNTYPED_SFIELD(sfPriceData, OBJECT, 32)
|
||||
UNTYPED_SFIELD(sfCredential, OBJECT, 33)
|
||||
UNTYPED_SFIELD(sfRawTransaction, OBJECT, 34)
|
||||
UNTYPED_SFIELD(sfBatchSigner, OBJECT, 35)
|
||||
UNTYPED_SFIELD(sfBook, OBJECT, 36)
|
||||
|
||||
// array of objects (common)
|
||||
// ARRAY/1 is reserved for end of array
|
||||
// sfSigningAccounts has never been used.
|
||||
//UNTYPED_SFIELD(sfSigningAccounts, sfInvalid, ARRAY, 2)
|
||||
ARRAY_SFIELD(sfSigners, sfSigner, ARRAY, 3, SField::sMD_Default, SField::notSigning)
|
||||
ARRAY_SFIELD(sfSignerEntries, sfSignerEntry, ARRAY, 4)
|
||||
ARRAY_SFIELD(sfTemplate, sfInvalid, ARRAY, 5)
|
||||
ARRAY_SFIELD(sfNecessary, sfInvalid, ARRAY, 6)
|
||||
ARRAY_SFIELD(sfSufficient, sfInvalid, ARRAY, 7)
|
||||
ARRAY_SFIELD(sfAffectedNodes, sfInvalid, ARRAY, 8)
|
||||
ARRAY_SFIELD(sfMemos, sfInvalid, ARRAY, 9)
|
||||
ARRAY_SFIELD(sfNFTokens, sfNFToken, ARRAY, 10)
|
||||
ARRAY_SFIELD(sfHooks, sfInvalid, ARRAY, 11)
|
||||
ARRAY_SFIELD(sfVoteSlots, sfVoteEntry, ARRAY, 12)
|
||||
ARRAY_SFIELD(sfAdditionalBooks, sfInvalid, ARRAY, 13)
|
||||
//UNTYPED_SFIELD(sfSigningAccounts, ARRAY, 2)
|
||||
UNTYPED_SFIELD(sfSigners, ARRAY, 3, SField::sMD_Default, SField::notSigning)
|
||||
UNTYPED_SFIELD(sfSignerEntries, ARRAY, 4)
|
||||
UNTYPED_SFIELD(sfTemplate, ARRAY, 5)
|
||||
UNTYPED_SFIELD(sfNecessary, ARRAY, 6)
|
||||
UNTYPED_SFIELD(sfSufficient, ARRAY, 7)
|
||||
UNTYPED_SFIELD(sfAffectedNodes, ARRAY, 8)
|
||||
UNTYPED_SFIELD(sfMemos, ARRAY, 9)
|
||||
UNTYPED_SFIELD(sfNFTokens, ARRAY, 10)
|
||||
UNTYPED_SFIELD(sfHooks, ARRAY, 11)
|
||||
UNTYPED_SFIELD(sfVoteSlots, ARRAY, 12)
|
||||
|
||||
// array of objects (uncommon)
|
||||
ARRAY_SFIELD(sfMajorities, sfMajority, ARRAY, 16)
|
||||
ARRAY_SFIELD(sfDisabledValidators, sfDisabledValidator, ARRAY, 17)
|
||||
ARRAY_SFIELD(sfHookExecutions, sfInvalid, ARRAY, 18)
|
||||
ARRAY_SFIELD(sfHookParameters, sfInvalid, ARRAY, 19)
|
||||
ARRAY_SFIELD(sfHookGrants, sfInvalid, ARRAY, 20)
|
||||
ARRAY_SFIELD(sfXChainClaimAttestations, sfInvalid, ARRAY, 21)
|
||||
ARRAY_SFIELD(sfXChainCreateAccountAttestations, sfInvalid, ARRAY, 22)
|
||||
UNTYPED_SFIELD(sfMajorities, ARRAY, 16)
|
||||
UNTYPED_SFIELD(sfDisabledValidators, ARRAY, 17)
|
||||
UNTYPED_SFIELD(sfHookExecutions, ARRAY, 18)
|
||||
UNTYPED_SFIELD(sfHookParameters, ARRAY, 19)
|
||||
UNTYPED_SFIELD(sfHookGrants, ARRAY, 20)
|
||||
UNTYPED_SFIELD(sfXChainClaimAttestations, ARRAY, 21)
|
||||
UNTYPED_SFIELD(sfXChainCreateAccountAttestations, ARRAY, 22)
|
||||
// 23 unused
|
||||
ARRAY_SFIELD(sfPriceDataSeries, sfPriceData, ARRAY, 24)
|
||||
ARRAY_SFIELD(sfAuthAccounts, sfAuthAccount, ARRAY, 25)
|
||||
ARRAY_SFIELD(sfAuthorizeCredentials, sfInvalid, ARRAY, 26)
|
||||
ARRAY_SFIELD(sfUnauthorizeCredentials, sfInvalid, ARRAY, 27)
|
||||
ARRAY_SFIELD(sfAcceptedCredentials, sfInvalid, ARRAY, 28)
|
||||
ARRAY_SFIELD(sfPermissions, sfPermission, ARRAY, 29)
|
||||
ARRAY_SFIELD(sfRawTransactions, sfInvalid, ARRAY, 30)
|
||||
ARRAY_SFIELD(sfBatchSigners, sfBatchSigner, ARRAY, 31, SField::sMD_Default, SField::notSigning)
|
||||
UNTYPED_SFIELD(sfPriceDataSeries, ARRAY, 24)
|
||||
UNTYPED_SFIELD(sfAuthAccounts, ARRAY, 25)
|
||||
UNTYPED_SFIELD(sfAuthorizeCredentials, ARRAY, 26)
|
||||
UNTYPED_SFIELD(sfUnauthorizeCredentials, ARRAY, 27)
|
||||
UNTYPED_SFIELD(sfAcceptedCredentials, ARRAY, 28)
|
||||
|
||||
@@ -50,7 +50,7 @@ class TokenCodecErrcCategory : public std::error_category
|
||||
{
|
||||
public:
|
||||
// Return a short descriptive name for the category
|
||||
virtual char const*
|
||||
virtual const char*
|
||||
name() const noexcept override final
|
||||
{
|
||||
return "TokenCodecError";
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
};
|
||||
} // namespace detail
|
||||
|
||||
inline ripple::detail::TokenCodecErrcCategory const&
|
||||
inline const ripple::detail::TokenCodecErrcCategory&
|
||||
TokenCodecErrcCategory()
|
||||
{
|
||||
static ripple::detail::TokenCodecErrcCategory c;
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* TRANSACTION(tag, value, name, delegatable, fields)
|
||||
* TRANSACTION(tag, value, name, fields)
|
||||
*
|
||||
* You must define a transactor class in the `ripple` namespace named `name`,
|
||||
* and include its header in `src/xrpld/app/tx/detail/applySteps.cpp`.
|
||||
*/
|
||||
|
||||
/** This transaction type executes a payment. */
|
||||
TRANSACTION(ttPAYMENT, 0, Payment, Delegation::delegatable, ({
|
||||
TRANSACTION(ttPAYMENT, 0, Payment, ({
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED, soeMPTSupported},
|
||||
{sfSendMax, soeOPTIONAL, soeMPTSupported},
|
||||
@@ -38,13 +38,12 @@ TRANSACTION(ttPAYMENT, 0, Payment, Delegation::delegatable, ({
|
||||
{sfDestinationTag, soeOPTIONAL},
|
||||
{sfDeliverMin, soeOPTIONAL, soeMPTSupported},
|
||||
{sfCredentialIDs, soeOPTIONAL},
|
||||
{sfDomainID, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type creates an escrow object. */
|
||||
TRANSACTION(ttESCROW_CREATE, 1, EscrowCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttESCROW_CREATE, 1, EscrowCreate, ({
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED, soeMPTSupported},
|
||||
{sfAmount, soeREQUIRED},
|
||||
{sfCondition, soeOPTIONAL},
|
||||
{sfCancelAfter, soeOPTIONAL},
|
||||
{sfFinishAfter, soeOPTIONAL},
|
||||
@@ -52,7 +51,7 @@ TRANSACTION(ttESCROW_CREATE, 1, EscrowCreate, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type completes an existing escrow. */
|
||||
TRANSACTION(ttESCROW_FINISH, 2, EscrowFinish, Delegation::delegatable, ({
|
||||
TRANSACTION(ttESCROW_FINISH, 2, EscrowFinish, ({
|
||||
{sfOwner, soeREQUIRED},
|
||||
{sfOfferSequence, soeREQUIRED},
|
||||
{sfFulfillment, soeOPTIONAL},
|
||||
@@ -62,7 +61,7 @@ TRANSACTION(ttESCROW_FINISH, 2, EscrowFinish, Delegation::delegatable, ({
|
||||
|
||||
|
||||
/** This transaction type adjusts various account settings. */
|
||||
TRANSACTION(ttACCOUNT_SET, 3, AccountSet, Delegation::notDelegatable, ({
|
||||
TRANSACTION(ttACCOUNT_SET, 3, AccountSet, ({
|
||||
{sfEmailHash, soeOPTIONAL},
|
||||
{sfWalletLocator, soeOPTIONAL},
|
||||
{sfWalletSize, soeOPTIONAL},
|
||||
@@ -76,36 +75,35 @@ TRANSACTION(ttACCOUNT_SET, 3, AccountSet, Delegation::notDelegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type cancels an existing escrow. */
|
||||
TRANSACTION(ttESCROW_CANCEL, 4, EscrowCancel, Delegation::delegatable, ({
|
||||
TRANSACTION(ttESCROW_CANCEL, 4, EscrowCancel, ({
|
||||
{sfOwner, soeREQUIRED},
|
||||
{sfOfferSequence, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type sets or clears an account's "regular key". */
|
||||
TRANSACTION(ttREGULAR_KEY_SET, 5, SetRegularKey, Delegation::notDelegatable, ({
|
||||
TRANSACTION(ttREGULAR_KEY_SET, 5, SetRegularKey, ({
|
||||
{sfRegularKey, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
// 6 deprecated
|
||||
|
||||
/** This transaction type creates an offer to trade one asset for another. */
|
||||
TRANSACTION(ttOFFER_CREATE, 7, OfferCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttOFFER_CREATE, 7, OfferCreate, ({
|
||||
{sfTakerPays, soeREQUIRED},
|
||||
{sfTakerGets, soeREQUIRED},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
{sfOfferSequence, soeOPTIONAL},
|
||||
{sfDomainID, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type cancels existing offers to trade one asset for another. */
|
||||
TRANSACTION(ttOFFER_CANCEL, 8, OfferCancel, Delegation::delegatable, ({
|
||||
TRANSACTION(ttOFFER_CANCEL, 8, OfferCancel, ({
|
||||
{sfOfferSequence, soeREQUIRED},
|
||||
}))
|
||||
|
||||
// 9 deprecated
|
||||
|
||||
/** This transaction type creates a new set of tickets. */
|
||||
TRANSACTION(ttTICKET_CREATE, 10, TicketCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttTICKET_CREATE, 10, TicketCreate, ({
|
||||
{sfTicketCount, soeREQUIRED},
|
||||
}))
|
||||
|
||||
@@ -114,13 +112,13 @@ TRANSACTION(ttTICKET_CREATE, 10, TicketCreate, Delegation::delegatable, ({
|
||||
/** This transaction type modifies the signer list associated with an account. */
|
||||
// The SignerEntries are optional because a SignerList is deleted by
|
||||
// setting the SignerQuorum to zero and omitting SignerEntries.
|
||||
TRANSACTION(ttSIGNER_LIST_SET, 12, SignerListSet, Delegation::notDelegatable, ({
|
||||
TRANSACTION(ttSIGNER_LIST_SET, 12, SignerListSet, ({
|
||||
{sfSignerQuorum, soeREQUIRED},
|
||||
{sfSignerEntries, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type creates a new unidirectional XRP payment channel. */
|
||||
TRANSACTION(ttPAYCHAN_CREATE, 13, PaymentChannelCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttPAYCHAN_CREATE, 13, PaymentChannelCreate, ({
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED},
|
||||
{sfSettleDelay, soeREQUIRED},
|
||||
@@ -130,14 +128,14 @@ TRANSACTION(ttPAYCHAN_CREATE, 13, PaymentChannelCreate, Delegation::delegatable,
|
||||
}))
|
||||
|
||||
/** This transaction type funds an existing unidirectional XRP payment channel. */
|
||||
TRANSACTION(ttPAYCHAN_FUND, 14, PaymentChannelFund, Delegation::delegatable, ({
|
||||
TRANSACTION(ttPAYCHAN_FUND, 14, PaymentChannelFund, ({
|
||||
{sfChannel, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type submits a claim against an existing unidirectional payment channel. */
|
||||
TRANSACTION(ttPAYCHAN_CLAIM, 15, PaymentChannelClaim, Delegation::delegatable, ({
|
||||
TRANSACTION(ttPAYCHAN_CLAIM, 15, PaymentChannelClaim, ({
|
||||
{sfChannel, soeREQUIRED},
|
||||
{sfAmount, soeOPTIONAL},
|
||||
{sfBalance, soeOPTIONAL},
|
||||
@@ -147,7 +145,7 @@ TRANSACTION(ttPAYCHAN_CLAIM, 15, PaymentChannelClaim, Delegation::delegatable, (
|
||||
}))
|
||||
|
||||
/** This transaction type creates a new check. */
|
||||
TRANSACTION(ttCHECK_CREATE, 16, CheckCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttCHECK_CREATE, 16, CheckCreate, ({
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfSendMax, soeREQUIRED},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
@@ -156,19 +154,19 @@ TRANSACTION(ttCHECK_CREATE, 16, CheckCreate, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type cashes an existing check. */
|
||||
TRANSACTION(ttCHECK_CASH, 17, CheckCash, Delegation::delegatable, ({
|
||||
TRANSACTION(ttCHECK_CASH, 17, CheckCash, ({
|
||||
{sfCheckID, soeREQUIRED},
|
||||
{sfAmount, soeOPTIONAL},
|
||||
{sfDeliverMin, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type cancels an existing check. */
|
||||
TRANSACTION(ttCHECK_CANCEL, 18, CheckCancel, Delegation::delegatable, ({
|
||||
TRANSACTION(ttCHECK_CANCEL, 18, CheckCancel, ({
|
||||
{sfCheckID, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type grants or revokes authorization to transfer funds. */
|
||||
TRANSACTION(ttDEPOSIT_PREAUTH, 19, DepositPreauth, Delegation::delegatable, ({
|
||||
TRANSACTION(ttDEPOSIT_PREAUTH, 19, DepositPreauth, ({
|
||||
{sfAuthorize, soeOPTIONAL},
|
||||
{sfUnauthorize, soeOPTIONAL},
|
||||
{sfAuthorizeCredentials, soeOPTIONAL},
|
||||
@@ -176,14 +174,14 @@ TRANSACTION(ttDEPOSIT_PREAUTH, 19, DepositPreauth, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type modifies a trustline between two accounts. */
|
||||
TRANSACTION(ttTRUST_SET, 20, TrustSet, Delegation::delegatable, ({
|
||||
TRANSACTION(ttTRUST_SET, 20, TrustSet, ({
|
||||
{sfLimitAmount, soeOPTIONAL},
|
||||
{sfQualityIn, soeOPTIONAL},
|
||||
{sfQualityOut, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type deletes an existing account. */
|
||||
TRANSACTION(ttACCOUNT_DELETE, 21, AccountDelete, Delegation::notDelegatable, ({
|
||||
TRANSACTION(ttACCOUNT_DELETE, 21, AccountDelete, ({
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfDestinationTag, soeOPTIONAL},
|
||||
{sfCredentialIDs, soeOPTIONAL},
|
||||
@@ -192,7 +190,7 @@ TRANSACTION(ttACCOUNT_DELETE, 21, AccountDelete, Delegation::notDelegatable, ({
|
||||
// 22 reserved
|
||||
|
||||
/** This transaction mints a new NFT. */
|
||||
TRANSACTION(ttNFTOKEN_MINT, 25, NFTokenMint, Delegation::delegatable, ({
|
||||
TRANSACTION(ttNFTOKEN_MINT, 25, NFTokenMint, ({
|
||||
{sfNFTokenTaxon, soeREQUIRED},
|
||||
{sfTransferFee, soeOPTIONAL},
|
||||
{sfIssuer, soeOPTIONAL},
|
||||
@@ -203,13 +201,13 @@ TRANSACTION(ttNFTOKEN_MINT, 25, NFTokenMint, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction burns (i.e. destroys) an existing NFT. */
|
||||
TRANSACTION(ttNFTOKEN_BURN, 26, NFTokenBurn, Delegation::delegatable, ({
|
||||
TRANSACTION(ttNFTOKEN_BURN, 26, NFTokenBurn, ({
|
||||
{sfNFTokenID, soeREQUIRED},
|
||||
{sfOwner, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction creates a new offer to buy or sell an NFT. */
|
||||
TRANSACTION(ttNFTOKEN_CREATE_OFFER, 27, NFTokenCreateOffer, Delegation::delegatable, ({
|
||||
TRANSACTION(ttNFTOKEN_CREATE_OFFER, 27, NFTokenCreateOffer, ({
|
||||
{sfNFTokenID, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED},
|
||||
{sfDestination, soeOPTIONAL},
|
||||
@@ -218,25 +216,25 @@ TRANSACTION(ttNFTOKEN_CREATE_OFFER, 27, NFTokenCreateOffer, Delegation::delegata
|
||||
}))
|
||||
|
||||
/** This transaction cancels an existing offer to buy or sell an existing NFT. */
|
||||
TRANSACTION(ttNFTOKEN_CANCEL_OFFER, 28, NFTokenCancelOffer, Delegation::delegatable, ({
|
||||
TRANSACTION(ttNFTOKEN_CANCEL_OFFER, 28, NFTokenCancelOffer, ({
|
||||
{sfNFTokenOffers, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction accepts an existing offer to buy or sell an existing NFT. */
|
||||
TRANSACTION(ttNFTOKEN_ACCEPT_OFFER, 29, NFTokenAcceptOffer, Delegation::delegatable, ({
|
||||
TRANSACTION(ttNFTOKEN_ACCEPT_OFFER, 29, NFTokenAcceptOffer, ({
|
||||
{sfNFTokenBuyOffer, soeOPTIONAL},
|
||||
{sfNFTokenSellOffer, soeOPTIONAL},
|
||||
{sfNFTokenBrokerFee, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction claws back issued tokens. */
|
||||
TRANSACTION(ttCLAWBACK, 30, Clawback, Delegation::delegatable, ({
|
||||
TRANSACTION(ttCLAWBACK, 30, Clawback, ({
|
||||
{sfAmount, soeREQUIRED, soeMPTSupported},
|
||||
{sfHolder, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction claws back tokens from an AMM pool. */
|
||||
TRANSACTION(ttAMM_CLAWBACK, 31, AMMClawback, Delegation::delegatable, ({
|
||||
TRANSACTION(ttAMM_CLAWBACK, 31, AMMClawback, ({
|
||||
{sfHolder, soeREQUIRED},
|
||||
{sfAsset, soeREQUIRED},
|
||||
{sfAsset2, soeREQUIRED},
|
||||
@@ -244,14 +242,14 @@ TRANSACTION(ttAMM_CLAWBACK, 31, AMMClawback, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type creates an AMM instance */
|
||||
TRANSACTION(ttAMM_CREATE, 35, AMMCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttAMM_CREATE, 35, AMMCreate, ({
|
||||
{sfAmount, soeREQUIRED},
|
||||
{sfAmount2, soeREQUIRED},
|
||||
{sfTradingFee, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type deposits into an AMM instance */
|
||||
TRANSACTION(ttAMM_DEPOSIT, 36, AMMDeposit, Delegation::delegatable, ({
|
||||
TRANSACTION(ttAMM_DEPOSIT, 36, AMMDeposit, ({
|
||||
{sfAsset, soeREQUIRED},
|
||||
{sfAsset2, soeREQUIRED},
|
||||
{sfAmount, soeOPTIONAL},
|
||||
@@ -262,7 +260,7 @@ TRANSACTION(ttAMM_DEPOSIT, 36, AMMDeposit, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type withdraws from an AMM instance */
|
||||
TRANSACTION(ttAMM_WITHDRAW, 37, AMMWithdraw, Delegation::delegatable, ({
|
||||
TRANSACTION(ttAMM_WITHDRAW, 37, AMMWithdraw, ({
|
||||
{sfAsset, soeREQUIRED},
|
||||
{sfAsset2, soeREQUIRED},
|
||||
{sfAmount, soeOPTIONAL},
|
||||
@@ -272,14 +270,14 @@ TRANSACTION(ttAMM_WITHDRAW, 37, AMMWithdraw, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type votes for the trading fee */
|
||||
TRANSACTION(ttAMM_VOTE, 38, AMMVote, Delegation::delegatable, ({
|
||||
TRANSACTION(ttAMM_VOTE, 38, AMMVote, ({
|
||||
{sfAsset, soeREQUIRED},
|
||||
{sfAsset2, soeREQUIRED},
|
||||
{sfTradingFee, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type bids for the auction slot */
|
||||
TRANSACTION(ttAMM_BID, 39, AMMBid, Delegation::delegatable, ({
|
||||
TRANSACTION(ttAMM_BID, 39, AMMBid, ({
|
||||
{sfAsset, soeREQUIRED},
|
||||
{sfAsset2, soeREQUIRED},
|
||||
{sfBidMin, soeOPTIONAL},
|
||||
@@ -288,20 +286,20 @@ TRANSACTION(ttAMM_BID, 39, AMMBid, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type deletes AMM in the empty state */
|
||||
TRANSACTION(ttAMM_DELETE, 40, AMMDelete, Delegation::delegatable, ({
|
||||
TRANSACTION(ttAMM_DELETE, 40, AMMDelete, ({
|
||||
{sfAsset, soeREQUIRED},
|
||||
{sfAsset2, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transactions creates a crosschain sequence number */
|
||||
TRANSACTION(ttXCHAIN_CREATE_CLAIM_ID, 41, XChainCreateClaimID, Delegation::delegatable, ({
|
||||
TRANSACTION(ttXCHAIN_CREATE_CLAIM_ID, 41, XChainCreateClaimID, ({
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfSignatureReward, soeREQUIRED},
|
||||
{sfOtherChainSource, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transactions initiates a crosschain transaction */
|
||||
TRANSACTION(ttXCHAIN_COMMIT, 42, XChainCommit, Delegation::delegatable, ({
|
||||
TRANSACTION(ttXCHAIN_COMMIT, 42, XChainCommit, ({
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfXChainClaimID, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED},
|
||||
@@ -309,7 +307,7 @@ TRANSACTION(ttXCHAIN_COMMIT, 42, XChainCommit, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction completes a crosschain transaction */
|
||||
TRANSACTION(ttXCHAIN_CLAIM, 43, XChainClaim, Delegation::delegatable, ({
|
||||
TRANSACTION(ttXCHAIN_CLAIM, 43, XChainClaim, ({
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfXChainClaimID, soeREQUIRED},
|
||||
{sfDestination, soeREQUIRED},
|
||||
@@ -318,7 +316,7 @@ TRANSACTION(ttXCHAIN_CLAIM, 43, XChainClaim, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction initiates a crosschain account create transaction */
|
||||
TRANSACTION(ttXCHAIN_ACCOUNT_CREATE_COMMIT, 44, XChainAccountCreateCommit, Delegation::delegatable, ({
|
||||
TRANSACTION(ttXCHAIN_ACCOUNT_CREATE_COMMIT, 44, XChainAccountCreateCommit, ({
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfDestination, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED},
|
||||
@@ -326,7 +324,7 @@ TRANSACTION(ttXCHAIN_ACCOUNT_CREATE_COMMIT, 44, XChainAccountCreateCommit, Deleg
|
||||
}))
|
||||
|
||||
/** This transaction adds an attestation to a claim */
|
||||
TRANSACTION(ttXCHAIN_ADD_CLAIM_ATTESTATION, 45, XChainAddClaimAttestation, Delegation::delegatable, ({
|
||||
TRANSACTION(ttXCHAIN_ADD_CLAIM_ATTESTATION, 45, XChainAddClaimAttestation, ({
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
|
||||
{sfAttestationSignerAccount, soeREQUIRED},
|
||||
@@ -342,7 +340,7 @@ TRANSACTION(ttXCHAIN_ADD_CLAIM_ATTESTATION, 45, XChainAddClaimAttestation, Deleg
|
||||
}))
|
||||
|
||||
/** This transaction adds an attestation to an account */
|
||||
TRANSACTION(ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION, 46, XChainAddAccountCreateAttestation, Delegation::delegatable, ({
|
||||
TRANSACTION(ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION, 46, XChainAddAccountCreateAttestation, ({
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
|
||||
{sfAttestationSignerAccount, soeREQUIRED},
|
||||
@@ -359,31 +357,31 @@ TRANSACTION(ttXCHAIN_ADD_ACCOUNT_CREATE_ATTESTATION, 46, XChainAddAccountCreateA
|
||||
}))
|
||||
|
||||
/** This transaction modifies a sidechain */
|
||||
TRANSACTION(ttXCHAIN_MODIFY_BRIDGE, 47, XChainModifyBridge, Delegation::delegatable, ({
|
||||
TRANSACTION(ttXCHAIN_MODIFY_BRIDGE, 47, XChainModifyBridge, ({
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfSignatureReward, soeOPTIONAL},
|
||||
{sfMinAccountCreateAmount, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transactions creates a sidechain */
|
||||
TRANSACTION(ttXCHAIN_CREATE_BRIDGE, 48, XChainCreateBridge, Delegation::delegatable, ({
|
||||
TRANSACTION(ttXCHAIN_CREATE_BRIDGE, 48, XChainCreateBridge, ({
|
||||
{sfXChainBridge, soeREQUIRED},
|
||||
{sfSignatureReward, soeREQUIRED},
|
||||
{sfMinAccountCreateAmount, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type creates or updates a DID */
|
||||
TRANSACTION(ttDID_SET, 49, DIDSet, Delegation::delegatable, ({
|
||||
TRANSACTION(ttDID_SET, 49, DIDSet, ({
|
||||
{sfDIDDocument, soeOPTIONAL},
|
||||
{sfURI, soeOPTIONAL},
|
||||
{sfData, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type deletes a DID */
|
||||
TRANSACTION(ttDID_DELETE, 50, DIDDelete, Delegation::delegatable, ({}))
|
||||
TRANSACTION(ttDID_DELETE, 50, DIDDelete, ({}))
|
||||
|
||||
/** This transaction type creates an Oracle instance */
|
||||
TRANSACTION(ttORACLE_SET, 51, OracleSet, Delegation::delegatable, ({
|
||||
TRANSACTION(ttORACLE_SET, 51, OracleSet, ({
|
||||
{sfOracleDocumentID, soeREQUIRED},
|
||||
{sfProvider, soeOPTIONAL},
|
||||
{sfURI, soeOPTIONAL},
|
||||
@@ -393,18 +391,18 @@ TRANSACTION(ttORACLE_SET, 51, OracleSet, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction type deletes an Oracle instance */
|
||||
TRANSACTION(ttORACLE_DELETE, 52, OracleDelete, Delegation::delegatable, ({
|
||||
TRANSACTION(ttORACLE_DELETE, 52, OracleDelete, ({
|
||||
{sfOracleDocumentID, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type fixes a problem in the ledger state */
|
||||
TRANSACTION(ttLEDGER_STATE_FIX, 53, LedgerStateFix, Delegation::delegatable, ({
|
||||
TRANSACTION(ttLEDGER_STATE_FIX, 53, LedgerStateFix, ({
|
||||
{sfLedgerFixType, soeREQUIRED},
|
||||
{sfOwner, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type creates a MPTokensIssuance instance */
|
||||
TRANSACTION(ttMPTOKEN_ISSUANCE_CREATE, 54, MPTokenIssuanceCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttMPTOKEN_ISSUANCE_CREATE, 54, MPTokenIssuanceCreate, ({
|
||||
{sfAssetScale, soeOPTIONAL},
|
||||
{sfTransferFee, soeOPTIONAL},
|
||||
{sfMaximumAmount, soeOPTIONAL},
|
||||
@@ -412,24 +410,24 @@ TRANSACTION(ttMPTOKEN_ISSUANCE_CREATE, 54, MPTokenIssuanceCreate, Delegation::de
|
||||
}))
|
||||
|
||||
/** This transaction type destroys a MPTokensIssuance instance */
|
||||
TRANSACTION(ttMPTOKEN_ISSUANCE_DESTROY, 55, MPTokenIssuanceDestroy, Delegation::delegatable, ({
|
||||
TRANSACTION(ttMPTOKEN_ISSUANCE_DESTROY, 55, MPTokenIssuanceDestroy, ({
|
||||
{sfMPTokenIssuanceID, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type sets flags on a MPTokensIssuance or MPToken instance */
|
||||
TRANSACTION(ttMPTOKEN_ISSUANCE_SET, 56, MPTokenIssuanceSet, Delegation::delegatable, ({
|
||||
TRANSACTION(ttMPTOKEN_ISSUANCE_SET, 56, MPTokenIssuanceSet, ({
|
||||
{sfMPTokenIssuanceID, soeREQUIRED},
|
||||
{sfHolder, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type authorizes a MPToken instance */
|
||||
TRANSACTION(ttMPTOKEN_AUTHORIZE, 57, MPTokenAuthorize, Delegation::delegatable, ({
|
||||
TRANSACTION(ttMPTOKEN_AUTHORIZE, 57, MPTokenAuthorize, ({
|
||||
{sfMPTokenIssuanceID, soeREQUIRED},
|
||||
{sfHolder, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type create an Credential instance */
|
||||
TRANSACTION(ttCREDENTIAL_CREATE, 58, CredentialCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttCREDENTIAL_CREATE, 58, CredentialCreate, ({
|
||||
{sfSubject, soeREQUIRED},
|
||||
{sfCredentialType, soeREQUIRED},
|
||||
{sfExpiration, soeOPTIONAL},
|
||||
@@ -437,44 +435,38 @@ TRANSACTION(ttCREDENTIAL_CREATE, 58, CredentialCreate, Delegation::delegatable,
|
||||
}))
|
||||
|
||||
/** This transaction type accept an Credential object */
|
||||
TRANSACTION(ttCREDENTIAL_ACCEPT, 59, CredentialAccept, Delegation::delegatable, ({
|
||||
TRANSACTION(ttCREDENTIAL_ACCEPT, 59, CredentialAccept, ({
|
||||
{sfIssuer, soeREQUIRED},
|
||||
{sfCredentialType, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type delete an Credential object */
|
||||
TRANSACTION(ttCREDENTIAL_DELETE, 60, CredentialDelete, Delegation::delegatable, ({
|
||||
TRANSACTION(ttCREDENTIAL_DELETE, 60, CredentialDelete, ({
|
||||
{sfSubject, soeOPTIONAL},
|
||||
{sfIssuer, soeOPTIONAL},
|
||||
{sfCredentialType, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type modify a NFToken */
|
||||
TRANSACTION(ttNFTOKEN_MODIFY, 61, NFTokenModify, Delegation::delegatable, ({
|
||||
TRANSACTION(ttNFTOKEN_MODIFY, 61, NFTokenModify, ({
|
||||
{sfNFTokenID, soeREQUIRED},
|
||||
{sfOwner, soeOPTIONAL},
|
||||
{sfURI, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction type creates or modifies a Permissioned Domain */
|
||||
TRANSACTION(ttPERMISSIONED_DOMAIN_SET, 62, PermissionedDomainSet, Delegation::delegatable, ({
|
||||
TRANSACTION(ttPERMISSIONED_DOMAIN_SET, 62, PermissionedDomainSet, ({
|
||||
{sfDomainID, soeOPTIONAL},
|
||||
{sfAcceptedCredentials, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type deletes a Permissioned Domain */
|
||||
TRANSACTION(ttPERMISSIONED_DOMAIN_DELETE, 63, PermissionedDomainDelete, Delegation::delegatable, ({
|
||||
TRANSACTION(ttPERMISSIONED_DOMAIN_DELETE, 63, PermissionedDomainDelete, ({
|
||||
{sfDomainID, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction type delegates authorized account specified permissions */
|
||||
TRANSACTION(ttDELEGATE_SET, 64, DelegateSet, Delegation::notDelegatable, ({
|
||||
{sfAuthorize, soeREQUIRED},
|
||||
{sfPermissions, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction creates a single asset vault. */
|
||||
TRANSACTION(ttVAULT_CREATE, 65, VaultCreate, Delegation::delegatable, ({
|
||||
TRANSACTION(ttVAULT_CREATE, 64, VaultCreate, ({
|
||||
{sfAsset, soeREQUIRED, soeMPTSupported},
|
||||
{sfAssetsMaximum, soeOPTIONAL},
|
||||
{sfMPTokenMetadata, soeOPTIONAL},
|
||||
@@ -484,7 +476,7 @@ TRANSACTION(ttVAULT_CREATE, 65, VaultCreate, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction updates a single asset vault. */
|
||||
TRANSACTION(ttVAULT_SET, 66, VaultSet, Delegation::delegatable, ({
|
||||
TRANSACTION(ttVAULT_SET, 65, VaultSet, ({
|
||||
{sfVaultID, soeREQUIRED},
|
||||
{sfAssetsMaximum, soeOPTIONAL},
|
||||
{sfDomainID, soeOPTIONAL}, // PermissionedDomainID
|
||||
@@ -492,41 +484,35 @@ TRANSACTION(ttVAULT_SET, 66, VaultSet, Delegation::delegatable, ({
|
||||
}))
|
||||
|
||||
/** This transaction deletes a single asset vault. */
|
||||
TRANSACTION(ttVAULT_DELETE, 67, VaultDelete, Delegation::delegatable, ({
|
||||
TRANSACTION(ttVAULT_DELETE, 66, VaultDelete, ({
|
||||
{sfVaultID, soeREQUIRED},
|
||||
}))
|
||||
|
||||
/** This transaction trades assets for shares with a vault. */
|
||||
TRANSACTION(ttVAULT_DEPOSIT, 68, VaultDeposit, Delegation::delegatable, ({
|
||||
TRANSACTION(ttVAULT_DEPOSIT, 67, VaultDeposit, ({
|
||||
{sfVaultID, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED, soeMPTSupported},
|
||||
}))
|
||||
|
||||
/** This transaction trades shares for assets with a vault. */
|
||||
TRANSACTION(ttVAULT_WITHDRAW, 69, VaultWithdraw, Delegation::delegatable, ({
|
||||
TRANSACTION(ttVAULT_WITHDRAW, 68, VaultWithdraw, ({
|
||||
{sfVaultID, soeREQUIRED},
|
||||
{sfAmount, soeREQUIRED, soeMPTSupported},
|
||||
{sfDestination, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction claws back tokens from a vault. */
|
||||
TRANSACTION(ttVAULT_CLAWBACK, 70, VaultClawback, Delegation::delegatable, ({
|
||||
TRANSACTION(ttVAULT_CLAWBACK, 69, VaultClawback, ({
|
||||
{sfVaultID, soeREQUIRED},
|
||||
{sfHolder, soeREQUIRED},
|
||||
{sfAmount, soeOPTIONAL, soeMPTSupported},
|
||||
}))
|
||||
|
||||
/** This transaction type batches together transactions. */
|
||||
TRANSACTION(ttBATCH, 71, Batch, Delegation::notDelegatable, ({
|
||||
{sfRawTransactions, soeREQUIRED},
|
||||
{sfBatchSigners, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This system-generated transaction type is used to update the status of the various amendments.
|
||||
|
||||
For details, see: https://xrpl.org/amendments.html
|
||||
*/
|
||||
TRANSACTION(ttAMENDMENT, 100, EnableAmendment, Delegation::notDelegatable, ({
|
||||
TRANSACTION(ttAMENDMENT, 100, EnableAmendment, ({
|
||||
{sfLedgerSequence, soeREQUIRED},
|
||||
{sfAmendment, soeREQUIRED},
|
||||
}))
|
||||
@@ -534,7 +520,7 @@ TRANSACTION(ttAMENDMENT, 100, EnableAmendment, Delegation::notDelegatable, ({
|
||||
/** This system-generated transaction type is used to update the network's fee settings.
|
||||
For details, see: https://xrpl.org/fee-voting.html
|
||||
*/
|
||||
TRANSACTION(ttFEE, 101, SetFee, Delegation::notDelegatable, ({
|
||||
TRANSACTION(ttFEE, 101, SetFee, ({
|
||||
{sfLedgerSequence, soeOPTIONAL},
|
||||
// Old version uses raw numbers
|
||||
{sfBaseFee, soeOPTIONAL},
|
||||
@@ -551,8 +537,9 @@ TRANSACTION(ttFEE, 101, SetFee, Delegation::notDelegatable, ({
|
||||
|
||||
For details, see: https://xrpl.org/negative-unl.html
|
||||
*/
|
||||
TRANSACTION(ttUNL_MODIFY, 102, UNLModify, Delegation::notDelegatable, ({
|
||||
TRANSACTION(ttUNL_MODIFY, 102, UNLModify, ({
|
||||
{sfUNLModifyDisabling, soeREQUIRED},
|
||||
{sfLedgerSequence, soeREQUIRED},
|
||||
{sfUNLModifyValidator, soeREQUIRED},
|
||||
}))
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ struct JsonMissingKeyError : std::exception
|
||||
JsonMissingKeyError(Json::StaticString const& k) : key{k.c_str()}
|
||||
{
|
||||
}
|
||||
char const*
|
||||
const char*
|
||||
what() const noexcept override
|
||||
{
|
||||
if (msg.empty())
|
||||
@@ -40,7 +40,7 @@ struct JsonTypeMismatchError : std::exception
|
||||
: key{k.c_str()}, expectedType{std::move(et)}
|
||||
{
|
||||
}
|
||||
char const*
|
||||
const char*
|
||||
what() const noexcept override
|
||||
{
|
||||
if (msg.empty())
|
||||
|
||||
@@ -83,14 +83,13 @@ JSS(PriceDataSeries); // field.
|
||||
JSS(PriceData); // field.
|
||||
JSS(Provider); // field.
|
||||
JSS(QuoteAsset); // in: Oracle.
|
||||
JSS(RawTransaction); // in: Batch
|
||||
JSS(RawTransactions); // in: Batch
|
||||
JSS(SLE_hit_rate); // out: GetCounts.
|
||||
JSS(Scale); // field.
|
||||
JSS(SettleDelay); // in: TransactionSign
|
||||
JSS(SendMax); // in: TransactionSign
|
||||
JSS(Sequence); // in/out: TransactionSign; field.
|
||||
JSS(SetFlag); // field.
|
||||
JSS(SharesTotal); // out: Vault
|
||||
JSS(Signer); // field.
|
||||
JSS(Signers); // field.
|
||||
JSS(SigningPubKey); // field.
|
||||
@@ -102,6 +101,7 @@ JSS(TransactionType); // in: TransactionSign.
|
||||
JSS(TransferRate); // in: TransferRate.
|
||||
JSS(TxnSignature); // field.
|
||||
JSS(URI); // field.
|
||||
JSS(VaultID); // field.
|
||||
JSS(VoteSlots); // out: AMM Vote
|
||||
JSS(aborted); // out: InboundLedger
|
||||
JSS(accepted); // out: LedgerToJson, OwnerInfo, SubmitTransaction
|
||||
@@ -147,7 +147,6 @@ JSS(attestations);
|
||||
JSS(attestation_reward_account);
|
||||
JSS(auction_slot); // out: amm_info
|
||||
JSS(authorized); // out: AccountLines
|
||||
JSS(authorize); // out: delegate
|
||||
JSS(authorized_credentials); // in: ledger_entry DepositPreauth
|
||||
JSS(auth_accounts); // out: amm_info
|
||||
JSS(auth_change); // out: AccountInfo
|
||||
@@ -391,7 +390,6 @@ JSS(load_fee); // out: LoadFeeTrackImp, NetworkOPs
|
||||
JSS(local); // out: resource/Logic.h
|
||||
JSS(local_txs); // out: GetCounts
|
||||
JSS(local_static_keys); // out: ValidatorList
|
||||
JSS(locked); // out: GatewayBalances
|
||||
JSS(low); // out: BookChanges
|
||||
JSS(lowest_sequence); // out: AccountInfo
|
||||
JSS(lowest_ticket); // out: AccountInfo
|
||||
@@ -689,7 +687,6 @@ JSS(validations); // out: AmendmentTableImpl
|
||||
JSS(validator_list_threshold); // out: ValidatorList
|
||||
JSS(validator_sites); // out: ValidatorSites
|
||||
JSS(value); // out: STAmount
|
||||
JSS(vault_id); // in: VaultInfo
|
||||
JSS(version); // out: RPCVersion
|
||||
JSS(vetoed); // out: AmendmentTableImpl
|
||||
JSS(volume_a); // out: BookChanges
|
||||
@@ -706,7 +703,7 @@ JSS(write_load); // out: GetCounts
|
||||
#pragma push_macro("TRANSACTION")
|
||||
#undef TRANSACTION
|
||||
|
||||
#define TRANSACTION(tag, value, name, delegatable, fields) JSS(name);
|
||||
#define TRANSACTION(tag, value, name, fields) JSS(name);
|
||||
|
||||
#include <xrpl/protocol/detail/transactions.macro>
|
||||
|
||||
@@ -717,19 +714,7 @@ JSS(write_load); // out: GetCounts
|
||||
#undef LEDGER_ENTRY
|
||||
#pragma push_macro("LEDGER_ENTRY_DUPLICATE")
|
||||
#undef LEDGER_ENTRY_DUPLICATE
|
||||
#pragma push_macro("LEDGER_ENTRY_FIELD")
|
||||
#undef LEDGER_ENTRY_FIELD
|
||||
#pragma push_macro("DEFINE_LEDGER_ENTRY_FIELDS")
|
||||
#undef DEFINE_LEDGER_ENTRY_FIELDS
|
||||
#pragma push_macro("LEDGER_ENTRIES_BEGIN")
|
||||
#undef LEDGER_ENTRIES_BEGIN
|
||||
#pragma push_macro("LEDGER_ENTRIES_END")
|
||||
#undef LEDGER_ENTRIES_END
|
||||
|
||||
#define LEDGER_ENTRIES_BEGIN
|
||||
#define LEDGER_ENTRIES_END
|
||||
#define DEFINE_LEDGER_ENTRY_FIELDS(...) ({__VA_ARGS__})
|
||||
#define LEDGER_ENTRY_FIELD(...) {__VA_ARGS__},
|
||||
#define LEDGER_ENTRY(tag, value, name, rpcName, fields) \
|
||||
JSS(name); \
|
||||
JSS(rpcName);
|
||||
@@ -742,17 +727,11 @@ JSS(write_load); // out: GetCounts
|
||||
#pragma pop_macro("LEDGER_ENTRY")
|
||||
#undef LEDGER_ENTRY_DUPLICATE
|
||||
#pragma pop_macro("LEDGER_ENTRY_DUPLICATE")
|
||||
#undef LEDGER_ENTRY_FIELD
|
||||
#pragma pop_macro("LEDGER_ENTRY_FIELD")
|
||||
#undef DEFINE_LEDGER_ENTRY_FIELDS
|
||||
#pragma pop_macro("DEFINE_LEDGER_ENTRY_FIELDS")
|
||||
#undef LEDGER_ENTRIES_BEGIN
|
||||
#pragma pop_macro("LEDGER_ENTRIES_BEGIN")
|
||||
#undef LEDGER_ENTRIES_END
|
||||
#pragma pop_macro("LEDGER_ENTRIES_END")
|
||||
|
||||
#undef JSS
|
||||
|
||||
// clang-format on
|
||||
|
||||
} // namespace jss
|
||||
} // namespace ripple
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ struct Key
|
||||
|
||||
struct key_equal
|
||||
{
|
||||
key_equal() = default;
|
||||
explicit key_equal() = default;
|
||||
|
||||
bool
|
||||
operator()(Key const& lhs, Key const& rhs) const
|
||||
|
||||
@@ -94,7 +94,7 @@ extractTarLz4(
|
||||
|
||||
if (archive_entry_size(entry) > 0)
|
||||
{
|
||||
void const* buf;
|
||||
const void* buf;
|
||||
size_t sz;
|
||||
la_int64_t offset;
|
||||
while (true)
|
||||
|
||||
@@ -63,7 +63,7 @@ getFileContents(
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string const result{
|
||||
const std::string result{
|
||||
std::istreambuf_iterator<char>{fileStream},
|
||||
std::istreambuf_iterator<char>{}};
|
||||
|
||||
|
||||
@@ -469,7 +469,7 @@ Number::operator/=(Number const& y)
|
||||
}
|
||||
// Shift by 10^17 gives greatest precision while not overflowing uint128_t
|
||||
// or the cast back to int64_t
|
||||
uint128_t const f = 100'000'000'000'000'000;
|
||||
const uint128_t f = 100'000'000'000'000'000;
|
||||
mantissa_ = static_cast<std::int64_t>(uint128_t(nm) * f / uint128_t(dm));
|
||||
exponent_ = ne - de - 17;
|
||||
mantissa_ *= np * dp;
|
||||
|
||||
@@ -89,13 +89,13 @@ parseUrl(parsedURL& pUrl, std::string const& strUrl)
|
||||
boost::algorithm::to_lower(pUrl.scheme);
|
||||
pUrl.username = smMatch[2];
|
||||
pUrl.password = smMatch[3];
|
||||
std::string const domain = smMatch[4];
|
||||
const std::string domain = smMatch[4];
|
||||
// We need to use Endpoint to parse the domain to
|
||||
// strip surrounding brackets from IPv6 addresses,
|
||||
// e.g. [::1] => ::1.
|
||||
auto const result = beast::IP::Endpoint::from_string_checked(domain);
|
||||
const auto result = beast::IP::Endpoint::from_string_checked(domain);
|
||||
pUrl.domain = result ? result->address().to_string() : domain;
|
||||
std::string const port = smMatch[5];
|
||||
const std::string port = smMatch[5];
|
||||
if (!port.empty())
|
||||
{
|
||||
pUrl.port = beast::lexicalCast<std::uint16_t>(port);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user