diff --git a/.codecov.yml b/.codecov.yml index d28d7c80df..cd52e2604d 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -33,5 +33,6 @@ slack_app: false ignore: - "src/test/" + - "src/tests/" - "include/xrpl/beast/test/" - "include/xrpl/beast/unit_test/" diff --git a/.github/scripts/levelization/results/loops.txt b/.github/scripts/levelization/results/loops.txt index 0bbd65a9e4..e998e962d4 100644 --- a/.github/scripts/levelization/results/loops.txt +++ b/.github/scripts/levelization/results/loops.txt @@ -7,9 +7,6 @@ Loop: test.jtx test.unit_test Loop: xrpld.app xrpld.core xrpld.app > xrpld.core -Loop: xrpld.app xrpld.ledger - xrpld.app > xrpld.ledger - Loop: xrpld.app xrpld.overlay xrpld.overlay > xrpld.app diff --git a/.github/scripts/levelization/results/ordering.txt b/.github/scripts/levelization/results/ordering.txt index bf2d1db693..13de36e2a5 100644 --- a/.github/scripts/levelization/results/ordering.txt +++ b/.github/scripts/levelization/results/ordering.txt @@ -2,6 +2,10 @@ libxrpl.basics > xrpl.basics libxrpl.crypto > xrpl.basics libxrpl.json > xrpl.basics libxrpl.json > xrpl.json +libxrpl.ledger > xrpl.basics +libxrpl.ledger > xrpl.json +libxrpl.ledger > xrpl.ledger +libxrpl.ledger > xrpl.protocol libxrpl.net > xrpl.basics libxrpl.net > xrpl.net libxrpl.protocol > xrpl.basics @@ -21,11 +25,11 @@ test.app > test.unit_test test.app > xrpl.basics test.app > xrpld.app test.app > xrpld.core -test.app > xrpld.ledger test.app > xrpld.nodestore test.app > xrpld.overlay test.app > xrpld.rpc test.app > xrpl.json +test.app > xrpl.ledger test.app > xrpl.protocol test.app > xrpl.resource test.basics > test.jtx @@ -44,8 +48,8 @@ test.consensus > test.unit_test test.consensus > xrpl.basics test.consensus > xrpld.app test.consensus > xrpld.consensus -test.consensus > xrpld.ledger test.consensus > xrpl.json +test.consensus > xrpl.ledger test.core > test.jtx test.core > test.toplevel test.core > test.unit_test @@ -63,9 +67,9 @@ test.json > xrpl.json test.jtx > xrpl.basics test.jtx > xrpld.app test.jtx > xrpld.core -test.jtx > xrpld.ledger test.jtx > xrpld.rpc test.jtx > xrpl.json +test.jtx > xrpl.ledger test.jtx > xrpl.net test.jtx > xrpl.protocol test.jtx > xrpl.resource @@ -75,7 +79,7 @@ test.ledger > test.toplevel test.ledger > xrpl.basics test.ledger > xrpld.app test.ledger > xrpld.core -test.ledger > xrpld.ledger +test.ledger > xrpl.ledger test.ledger > xrpl.protocol test.nodestore > test.jtx test.nodestore > test.toplevel @@ -135,6 +139,8 @@ test.toplevel > xrpl.json test.unit_test > xrpl.basics tests.libxrpl > xrpl.basics xrpl.json > xrpl.basics +xrpl.ledger > xrpl.basics +xrpl.ledger > xrpl.protocol xrpl.net > xrpl.basics xrpl.protocol > xrpl.basics xrpl.protocol > xrpl.json @@ -151,6 +157,7 @@ xrpld.app > xrpld.consensus xrpld.app > xrpld.nodestore xrpld.app > xrpld.perflog xrpld.app > xrpl.json +xrpld.app > xrpl.ledger xrpld.app > xrpl.net xrpld.app > xrpl.protocol xrpld.app > xrpl.resource @@ -163,9 +170,6 @@ xrpld.core > xrpl.basics xrpld.core > xrpl.json xrpld.core > xrpl.net xrpld.core > xrpl.protocol -xrpld.ledger > xrpl.basics -xrpld.ledger > xrpl.json -xrpld.ledger > xrpl.protocol xrpld.nodestore > xrpl.basics xrpld.nodestore > xrpld.core xrpld.nodestore > xrpld.unity @@ -186,9 +190,9 @@ xrpld.perflog > xrpl.basics xrpld.perflog > xrpl.json xrpld.rpc > xrpl.basics xrpld.rpc > xrpld.core -xrpld.rpc > xrpld.ledger xrpld.rpc > xrpld.nodestore xrpld.rpc > xrpl.json +xrpld.rpc > xrpl.ledger xrpld.rpc > xrpl.net xrpld.rpc > xrpl.protocol xrpld.rpc > xrpl.resource diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 69ff986f98..634ed42690 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -61,6 +61,7 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} + max-parallel: 10 runs-on: ${{ matrix.architecture.runner }} container: ${{ inputs.os == 'linux' && format('ghcr.io/xrplf/ci/{0}-{1}:{2}-{3}', matrix.os.distro_name, matrix.os.distro_version, matrix.os.compiler_name, matrix.os.compiler_version) || null }} steps: diff --git a/.github/workflows/on-trigger.yml b/.github/workflows/on-trigger.yml index 7c17621d67..06abbd3f17 100644 --- a/.github/workflows/on-trigger.yml +++ b/.github/workflows/on-trigger.yml @@ -80,6 +80,6 @@ jobs: os: [linux, macos, windows] with: os: ${{ matrix.os }} - strategy_matrix: "minimal" + strategy_matrix: ${{ github.event_name == 'schedule' && 'all' || 'minimal' }} secrets: codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/cmake/RippledCore.cmake b/cmake/RippledCore.cmake index 7d3561675a..481b6e3cea 100644 --- a/cmake/RippledCore.cmake +++ b/cmake/RippledCore.cmake @@ -111,6 +111,12 @@ target_link_libraries(xrpl.libxrpl.net PUBLIC add_module(xrpl server) target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol) +add_module(xrpl ledger) +target_link_libraries(xrpl.libxrpl.ledger PUBLIC + xrpl.libxrpl.basics + xrpl.libxrpl.json + xrpl.libxrpl.protocol +) add_library(xrpl.libxrpl) set_target_properties(xrpl.libxrpl PROPERTIES OUTPUT_NAME xrpl) @@ -131,6 +137,7 @@ target_link_modules(xrpl PUBLIC resource server net + ledger ) # All headers in libxrpl are in modules. diff --git a/cmake/RippledCov.cmake b/cmake/RippledCov.cmake index 847915a51a..6cbe2ff921 100644 --- a/cmake/RippledCov.cmake +++ b/cmake/RippledCov.cmake @@ -33,7 +33,7 @@ setup_target_for_coverage_gcovr( FORMAT ${coverage_format} EXECUTABLE rippled EXECUTABLE_ARGS --unittest$<$:=${coverage_test}> --unittest-jobs ${coverage_test_parallelism} --quiet --unittest-log - EXCLUDE "src/test" "include/xrpl/beast/test" "include/xrpl/beast/unit_test" "${CMAKE_BINARY_DIR}/pb-xrpl.libpb" + EXCLUDE "src/test" "src/tests" "include/xrpl/beast/test" "include/xrpl/beast/unit_test" "${CMAKE_BINARY_DIR}/pb-xrpl.libpb" DEPENDENCIES rippled ) diff --git a/cmake/RippledInstall.cmake b/cmake/RippledInstall.cmake index f32781f596..95c25a212f 100644 --- a/cmake/RippledInstall.cmake +++ b/cmake/RippledInstall.cmake @@ -18,6 +18,7 @@ install ( xrpl.libxrpl.json xrpl.libxrpl.protocol xrpl.libxrpl.resource + xrpl.libxrpl.ledger xrpl.libxrpl.server xrpl.libxrpl.net xrpl.libxrpl diff --git a/src/xrpld/ledger/ApplyView.h b/include/xrpl/ledger/ApplyView.h similarity index 99% rename from src/xrpld/ledger/ApplyView.h rename to include/xrpl/ledger/ApplyView.h index 1e4a5a112a..d8b9028d7c 100644 --- a/src/xrpld/ledger/ApplyView.h +++ b/include/xrpl/ledger/ApplyView.h @@ -20,11 +20,10 @@ #ifndef RIPPLE_LEDGER_APPLYVIEW_H_INCLUDED #define RIPPLE_LEDGER_APPLYVIEW_H_INCLUDED -#include -#include - #include #include +#include +#include namespace ripple { diff --git a/src/xrpld/ledger/ApplyViewImpl.h b/include/xrpl/ledger/ApplyViewImpl.h similarity index 97% rename from src/xrpld/ledger/ApplyViewImpl.h rename to include/xrpl/ledger/ApplyViewImpl.h index d170cf71ff..eadcd8acb5 100644 --- a/src/xrpld/ledger/ApplyViewImpl.h +++ b/include/xrpl/ledger/ApplyViewImpl.h @@ -20,9 +20,8 @@ #ifndef RIPPLE_LEDGER_APPLYVIEWIMPL_H_INCLUDED #define RIPPLE_LEDGER_APPLYVIEWIMPL_H_INCLUDED -#include -#include - +#include +#include #include #include diff --git a/src/xrpld/ledger/BookDirs.h b/include/xrpl/ledger/BookDirs.h similarity index 98% rename from src/xrpld/ledger/BookDirs.h rename to include/xrpl/ledger/BookDirs.h index dc58905c5a..95cd41e044 100644 --- a/src/xrpld/ledger/BookDirs.h +++ b/include/xrpl/ledger/BookDirs.h @@ -20,9 +20,8 @@ #ifndef RIPPLE_LEDGER_BOOK_DIRS_H_INCLUDED #define RIPPLE_LEDGER_BOOK_DIRS_H_INCLUDED -#include - #include +#include namespace ripple { diff --git a/src/xrpld/ledger/CachedSLEs.h b/include/xrpl/ledger/CachedSLEs.h similarity index 100% rename from src/xrpld/ledger/CachedSLEs.h rename to include/xrpl/ledger/CachedSLEs.h diff --git a/src/xrpld/ledger/CachedView.h b/include/xrpl/ledger/CachedView.h similarity index 98% rename from src/xrpld/ledger/CachedView.h rename to include/xrpl/ledger/CachedView.h index ae59312f98..3e1fb9cc72 100644 --- a/src/xrpld/ledger/CachedView.h +++ b/include/xrpl/ledger/CachedView.h @@ -20,10 +20,9 @@ #ifndef RIPPLE_LEDGER_CACHEDVIEW_H_INCLUDED #define RIPPLE_LEDGER_CACHEDVIEW_H_INCLUDED -#include -#include - #include +#include +#include #include #include diff --git a/src/xrpld/app/misc/CredentialHelpers.h b/include/xrpl/ledger/CredentialHelpers.h similarity index 98% rename from src/xrpld/app/misc/CredentialHelpers.h rename to include/xrpl/ledger/CredentialHelpers.h index 84938180ce..cb6b3c98ee 100644 --- a/src/xrpld/app/misc/CredentialHelpers.h +++ b/include/xrpl/ledger/CredentialHelpers.h @@ -20,12 +20,11 @@ #ifndef RIPPLE_APP_MISC_CREDENTIALHELPERS_H_INCLUDED #define RIPPLE_APP_MISC_CREDENTIALHELPERS_H_INCLUDED -#include -#include - #include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/ledger/Dir.h b/include/xrpl/ledger/Dir.h similarity index 98% rename from src/xrpld/ledger/Dir.h rename to include/xrpl/ledger/Dir.h index d3a52558fd..0e9e5e998f 100644 --- a/src/xrpld/ledger/Dir.h +++ b/include/xrpl/ledger/Dir.h @@ -20,8 +20,7 @@ #ifndef RIPPLE_LEDGER_DIR_H_INCLUDED #define RIPPLE_LEDGER_DIR_H_INCLUDED -#include - +#include #include namespace ripple { diff --git a/src/xrpld/ledger/OpenView.h b/include/xrpl/ledger/OpenView.h similarity index 98% rename from src/xrpld/ledger/OpenView.h rename to include/xrpl/ledger/OpenView.h index a1fa195a69..e856e03764 100644 --- a/src/xrpld/ledger/OpenView.h +++ b/include/xrpl/ledger/OpenView.h @@ -20,10 +20,9 @@ #ifndef RIPPLE_LEDGER_OPENVIEW_H_INCLUDED #define RIPPLE_LEDGER_OPENVIEW_H_INCLUDED -#include -#include -#include - +#include +#include +#include #include #include diff --git a/src/xrpld/ledger/PaymentSandbox.h b/include/xrpl/ledger/PaymentSandbox.h similarity index 98% rename from src/xrpld/ledger/PaymentSandbox.h rename to include/xrpl/ledger/PaymentSandbox.h index 2cd31ea490..c5bf28d1f9 100644 --- a/src/xrpld/ledger/PaymentSandbox.h +++ b/include/xrpl/ledger/PaymentSandbox.h @@ -20,10 +20,9 @@ #ifndef RIPPLE_LEDGER_PAYMENTSANDBOX_H_INCLUDED #define RIPPLE_LEDGER_PAYMENTSANDBOX_H_INCLUDED -#include -#include -#include - +#include +#include +#include #include #include diff --git a/src/xrpld/ledger/RawView.h b/include/xrpl/ledger/RawView.h similarity index 98% rename from src/xrpld/ledger/RawView.h rename to include/xrpl/ledger/RawView.h index fb6dcffe06..c22fd40132 100644 --- a/src/xrpld/ledger/RawView.h +++ b/include/xrpl/ledger/RawView.h @@ -20,8 +20,7 @@ #ifndef RIPPLE_LEDGER_RAWVIEW_H_INCLUDED #define RIPPLE_LEDGER_RAWVIEW_H_INCLUDED -#include - +#include #include #include diff --git a/src/xrpld/ledger/ReadView.h b/include/xrpl/ledger/ReadView.h similarity index 98% rename from src/xrpld/ledger/ReadView.h rename to include/xrpl/ledger/ReadView.h index 4c1986be4e..2c87dbbf6a 100644 --- a/src/xrpld/ledger/ReadView.h +++ b/include/xrpl/ledger/ReadView.h @@ -20,10 +20,9 @@ #ifndef RIPPLE_LEDGER_READVIEW_H_INCLUDED #define RIPPLE_LEDGER_READVIEW_H_INCLUDED -#include - #include #include +#include #include #include #include @@ -280,6 +279,6 @@ makeRulesGivenLedger( } // namespace ripple -#include +#include #endif diff --git a/src/xrpld/ledger/Sandbox.h b/include/xrpl/ledger/Sandbox.h similarity index 95% rename from src/xrpld/ledger/Sandbox.h rename to include/xrpl/ledger/Sandbox.h index 22b8dbecfb..495da120c6 100644 --- a/src/xrpld/ledger/Sandbox.h +++ b/include/xrpl/ledger/Sandbox.h @@ -20,8 +20,8 @@ #ifndef RIPPLE_LEDGER_SANDBOX_H_INCLUDED #define RIPPLE_LEDGER_SANDBOX_H_INCLUDED -#include -#include +#include +#include namespace ripple { diff --git a/src/xrpld/ledger/View.h b/include/xrpl/ledger/View.h similarity index 99% rename from src/xrpld/ledger/View.h rename to include/xrpl/ledger/View.h index adbe41d6c3..9698b4fda3 100644 --- a/src/xrpld/ledger/View.h +++ b/include/xrpl/ledger/View.h @@ -20,11 +20,10 @@ #ifndef RIPPLE_LEDGER_VIEW_H_INCLUDED #define RIPPLE_LEDGER_VIEW_H_INCLUDED -#include -#include -#include - #include +#include +#include +#include #include #include #include diff --git a/src/xrpld/ledger/detail/ApplyStateTable.h b/include/xrpl/ledger/detail/ApplyStateTable.h similarity index 97% rename from src/xrpld/ledger/detail/ApplyStateTable.h rename to include/xrpl/ledger/detail/ApplyStateTable.h index 5a2e0bcf54..01ab1e07ab 100644 --- a/src/xrpld/ledger/detail/ApplyStateTable.h +++ b/include/xrpl/ledger/detail/ApplyStateTable.h @@ -20,11 +20,10 @@ #ifndef RIPPLE_LEDGER_APPLYSTATETABLE_H_INCLUDED #define RIPPLE_LEDGER_APPLYSTATETABLE_H_INCLUDED -#include -#include -#include - #include +#include +#include +#include #include #include #include diff --git a/src/xrpld/ledger/detail/ApplyViewBase.h b/include/xrpl/ledger/detail/ApplyViewBase.h similarity index 96% rename from src/xrpld/ledger/detail/ApplyViewBase.h rename to include/xrpl/ledger/detail/ApplyViewBase.h index f9c9c80af0..af86fc23b4 100644 --- a/src/xrpld/ledger/detail/ApplyViewBase.h +++ b/include/xrpl/ledger/detail/ApplyViewBase.h @@ -20,10 +20,9 @@ #ifndef RIPPLE_LEDGER_APPLYVIEWBASE_H_INCLUDED #define RIPPLE_LEDGER_APPLYVIEWBASE_H_INCLUDED -#include -#include -#include - +#include +#include +#include #include namespace ripple { diff --git a/src/xrpld/ledger/detail/RawStateTable.h b/include/xrpl/ledger/detail/RawStateTable.h similarity index 98% rename from src/xrpld/ledger/detail/RawStateTable.h rename to include/xrpl/ledger/detail/RawStateTable.h index 37597aa678..53a6f52208 100644 --- a/src/xrpld/ledger/detail/RawStateTable.h +++ b/include/xrpl/ledger/detail/RawStateTable.h @@ -20,8 +20,8 @@ #ifndef RIPPLE_LEDGER_RAWSTATETABLE_H_INCLUDED #define RIPPLE_LEDGER_RAWSTATETABLE_H_INCLUDED -#include -#include +#include +#include #include #include diff --git a/src/xrpld/ledger/detail/ReadViewFwdRange.h b/include/xrpl/ledger/detail/ReadViewFwdRange.h similarity index 100% rename from src/xrpld/ledger/detail/ReadViewFwdRange.h rename to include/xrpl/ledger/detail/ReadViewFwdRange.h diff --git a/src/xrpld/ledger/detail/ReadViewFwdRange.ipp b/include/xrpl/ledger/detail/ReadViewFwdRange.ipp similarity index 100% rename from src/xrpld/ledger/detail/ReadViewFwdRange.ipp rename to include/xrpl/ledger/detail/ReadViewFwdRange.ipp diff --git a/include/xrpl/protocol/Indexes.h b/include/xrpl/protocol/Indexes.h index 3e3f2843c1..79be15d906 100644 --- a/include/xrpl/protocol/Indexes.h +++ b/include/xrpl/protocol/Indexes.h @@ -287,9 +287,11 @@ delegate(AccountID const& account, AccountID const& authorizedAccount) noexcept; Keylet bridge(STXChainBridge const& bridge, STXChainBridge::ChainType chainType); +// `seq` is stored as `sfXChainClaimID` in the object Keylet xChainClaimID(STXChainBridge const& bridge, std::uint64_t seq); +// `seq` is stored as `sfXChainAccountCreateCount` in the object Keylet xChainCreateAccountClaimID(STXChainBridge const& bridge, std::uint64_t seq); diff --git a/include/xrpl/protocol/LedgerFormats.h b/include/xrpl/protocol/LedgerFormats.h index e4cc117c07..40c9fce1bb 100644 --- a/include/xrpl/protocol/LedgerFormats.h +++ b/include/xrpl/protocol/LedgerFormats.h @@ -188,14 +188,14 @@ enum LedgerSpecificFlags { lsfMPTCanTransfer = 0x00000020, lsfMPTCanClawback = 0x00000040, - lsfMPTCanMutateCanLock = 0x00000002, - lsfMPTCanMutateRequireAuth = 0x00000004, - lsfMPTCanMutateCanEscrow = 0x00000008, - lsfMPTCanMutateCanTrade = 0x00000010, - lsfMPTCanMutateCanTransfer = 0x00000020, - lsfMPTCanMutateCanClawback = 0x00000040, - lsfMPTCanMutateMetadata = 0x00010000, - lsfMPTCanMutateTransferFee = 0x00020000, + lmfMPTCanMutateCanLock = 0x00000002, + lmfMPTCanMutateRequireAuth = 0x00000004, + lmfMPTCanMutateCanEscrow = 0x00000008, + lmfMPTCanMutateCanTrade = 0x00000010, + lmfMPTCanMutateCanTransfer = 0x00000020, + lmfMPTCanMutateCanClawback = 0x00000040, + lmfMPTCanMutateMetadata = 0x00010000, + lmfMPTCanMutateTransferFee = 0x00020000, // ltMPTOKEN lsfMPTAuthorized = 0x00000002, diff --git a/include/xrpl/protocol/TxFlags.h b/include/xrpl/protocol/TxFlags.h index ebbccd591c..30d991e680 100644 --- a/include/xrpl/protocol/TxFlags.h +++ b/include/xrpl/protocol/TxFlags.h @@ -156,17 +156,17 @@ constexpr std::uint32_t const tfMPTokenIssuanceCreateMask = // MPTokenIssuanceCreate MutableFlags: // Indicating specific fields or flags may be changed after issuance. -constexpr std::uint32_t const tfMPTCanMutateCanLock = lsfMPTCanMutateCanLock; -constexpr std::uint32_t const tfMPTCanMutateRequireAuth = lsfMPTCanMutateRequireAuth; -constexpr std::uint32_t const tfMPTCanMutateCanEscrow = lsfMPTCanMutateCanEscrow; -constexpr std::uint32_t const tfMPTCanMutateCanTrade = lsfMPTCanMutateCanTrade; -constexpr std::uint32_t const tfMPTCanMutateCanTransfer = lsfMPTCanMutateCanTransfer; -constexpr std::uint32_t const tfMPTCanMutateCanClawback = lsfMPTCanMutateCanClawback; -constexpr std::uint32_t const tfMPTCanMutateMetadata = lsfMPTCanMutateMetadata; -constexpr std::uint32_t const tfMPTCanMutateTransferFee = lsfMPTCanMutateTransferFee; -constexpr std::uint32_t const tfMPTokenIssuanceCreateMutableMask = - ~(tfMPTCanMutateCanLock | tfMPTCanMutateRequireAuth | tfMPTCanMutateCanEscrow | tfMPTCanMutateCanTrade - | tfMPTCanMutateCanTransfer | tfMPTCanMutateCanClawback | tfMPTCanMutateMetadata | tfMPTCanMutateTransferFee); +constexpr std::uint32_t const tmfMPTCanMutateCanLock = lmfMPTCanMutateCanLock; +constexpr std::uint32_t const tmfMPTCanMutateRequireAuth = lmfMPTCanMutateRequireAuth; +constexpr std::uint32_t const tmfMPTCanMutateCanEscrow = lmfMPTCanMutateCanEscrow; +constexpr std::uint32_t const tmfMPTCanMutateCanTrade = lmfMPTCanMutateCanTrade; +constexpr std::uint32_t const tmfMPTCanMutateCanTransfer = lmfMPTCanMutateCanTransfer; +constexpr std::uint32_t const tmfMPTCanMutateCanClawback = lmfMPTCanMutateCanClawback; +constexpr std::uint32_t const tmfMPTCanMutateMetadata = lmfMPTCanMutateMetadata; +constexpr std::uint32_t const tmfMPTCanMutateTransferFee = lmfMPTCanMutateTransferFee; +constexpr std::uint32_t const tmfMPTokenIssuanceCreateMutableMask = + ~(tmfMPTCanMutateCanLock | tmfMPTCanMutateRequireAuth | tmfMPTCanMutateCanEscrow | tmfMPTCanMutateCanTrade + | tmfMPTCanMutateCanTransfer | tmfMPTCanMutateCanClawback | tmfMPTCanMutateMetadata | tmfMPTCanMutateTransferFee); // MPTokenAuthorize flags: constexpr std::uint32_t const tfMPTUnauthorize = 0x00000001; @@ -180,22 +180,22 @@ constexpr std::uint32_t const tfMPTokenIssuanceSetPermissionMask = ~(tfUniversal // MPTokenIssuanceSet MutableFlags: // Set or Clear flags. -constexpr std::uint32_t const tfMPTSetCanLock = 0x00000001; -constexpr std::uint32_t const tfMPTClearCanLock = 0x00000002; -constexpr std::uint32_t const tfMPTSetRequireAuth = 0x00000004; -constexpr std::uint32_t const tfMPTClearRequireAuth = 0x00000008; -constexpr std::uint32_t const tfMPTSetCanEscrow = 0x00000010; -constexpr std::uint32_t const tfMPTClearCanEscrow = 0x00000020; -constexpr std::uint32_t const tfMPTSetCanTrade = 0x00000040; -constexpr std::uint32_t const tfMPTClearCanTrade = 0x00000080; -constexpr std::uint32_t const tfMPTSetCanTransfer = 0x00000100; -constexpr std::uint32_t const tfMPTClearCanTransfer = 0x00000200; -constexpr std::uint32_t const tfMPTSetCanClawback = 0x00000400; -constexpr std::uint32_t const tfMPTClearCanClawback = 0x00000800; -constexpr std::uint32_t const tfMPTokenIssuanceSetMutableMask = ~(tfMPTSetCanLock | tfMPTClearCanLock | - tfMPTSetRequireAuth | tfMPTClearRequireAuth | tfMPTSetCanEscrow | tfMPTClearCanEscrow | - tfMPTSetCanTrade | tfMPTClearCanTrade | tfMPTSetCanTransfer | tfMPTClearCanTransfer | - tfMPTSetCanClawback | tfMPTClearCanClawback); +constexpr std::uint32_t const tmfMPTSetCanLock = 0x00000001; +constexpr std::uint32_t const tmfMPTClearCanLock = 0x00000002; +constexpr std::uint32_t const tmfMPTSetRequireAuth = 0x00000004; +constexpr std::uint32_t const tmfMPTClearRequireAuth = 0x00000008; +constexpr std::uint32_t const tmfMPTSetCanEscrow = 0x00000010; +constexpr std::uint32_t const tmfMPTClearCanEscrow = 0x00000020; +constexpr std::uint32_t const tmfMPTSetCanTrade = 0x00000040; +constexpr std::uint32_t const tmfMPTClearCanTrade = 0x00000080; +constexpr std::uint32_t const tmfMPTSetCanTransfer = 0x00000100; +constexpr std::uint32_t const tmfMPTClearCanTransfer = 0x00000200; +constexpr std::uint32_t const tmfMPTSetCanClawback = 0x00000400; +constexpr std::uint32_t const tmfMPTClearCanClawback = 0x00000800; +constexpr std::uint32_t const tmfMPTokenIssuanceSetMutableMask = ~(tmfMPTSetCanLock | tmfMPTClearCanLock | + tmfMPTSetRequireAuth | tmfMPTClearRequireAuth | tmfMPTSetCanEscrow | tmfMPTClearCanEscrow | + tmfMPTSetCanTrade | tmfMPTClearCanTrade | tmfMPTSetCanTransfer | tmfMPTClearCanTransfer | + tmfMPTSetCanClawback | tmfMPTClearCanClawback); // MPTokenIssuanceDestroy flags: constexpr std::uint32_t const tfMPTokenIssuanceDestroyMask = ~tfUniversal; diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index a9f5d95624..9dc40dc8e5 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -32,6 +32,7 @@ // If you add an amendment here, then do not forget to increment `numFeatures` // in include/xrpl/protocol/Feature.h. +XRPL_FIX (IncludeKeyletFields, Supported::no, VoteBehavior::DefaultNo) XRPL_FEATURE(DynamicMPT, Supported::no, VoteBehavior::DefaultNo) XRPL_FIX (TokenEscrowV1, Supported::yes, VoteBehavior::DefaultNo) XRPL_FIX (DelegateV1_1, Supported::no, VoteBehavior::DefaultNo) diff --git a/include/xrpl/protocol/detail/ledger_entries.macro b/include/xrpl/protocol/detail/ledger_entries.macro index 1066986223..f76188095e 100644 --- a/include/xrpl/protocol/detail/ledger_entries.macro +++ b/include/xrpl/protocol/detail/ledger_entries.macro @@ -120,6 +120,7 @@ LEDGER_ENTRY(ltNFTOKEN_PAGE, 0x0050, NFTokenPage, nft_page, ({ // 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, ({ + {sfOwner, soeOPTIONAL}, {sfOwnerNode, soeREQUIRED}, {sfSignerQuorum, soeREQUIRED}, {sfSignerEntries, soeREQUIRED}, @@ -188,7 +189,7 @@ LEDGER_ENTRY(ltDIR_NODE, 0x0064, DirectoryNode, directory, ({ {sfNFTokenID, soeOPTIONAL}, {sfPreviousTxnID, soeOPTIONAL}, {sfPreviousTxnLgrSeq, soeOPTIONAL}, - {sfDomainID, soeOPTIONAL} + {sfDomainID, soeOPTIONAL} // order book directories })) /** The ledger object which lists details about amendments on the network. @@ -343,6 +344,7 @@ LEDGER_ENTRY(ltXCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID, 0x0074, XChainOwnedCreateAc */ LEDGER_ENTRY(ltESCROW, 0x0075, Escrow, escrow, ({ {sfAccount, soeREQUIRED}, + {sfSequence, soeOPTIONAL}, {sfDestination, soeREQUIRED}, {sfAmount, soeREQUIRED}, {sfCondition, soeOPTIONAL}, @@ -365,6 +367,7 @@ LEDGER_ENTRY(ltESCROW, 0x0075, Escrow, escrow, ({ LEDGER_ENTRY(ltPAYCHAN, 0x0078, PayChannel, payment_channel, ({ {sfAccount, soeREQUIRED}, {sfDestination, soeREQUIRED}, + {sfSequence, soeOPTIONAL}, {sfAmount, soeREQUIRED}, {sfBalance, soeREQUIRED}, {sfPublicKey, soeREQUIRED}, @@ -433,6 +436,7 @@ LEDGER_ENTRY(ltMPTOKEN, 0x007f, MPToken, mptoken, ({ */ LEDGER_ENTRY(ltORACLE, 0x0080, Oracle, oracle, ({ {sfOwner, soeREQUIRED}, + {sfOracleDocumentID, soeOPTIONAL}, {sfProvider, soeREQUIRED}, {sfPriceDataSeries, soeREQUIRED}, {sfAssetClass, soeREQUIRED}, diff --git a/src/xrpld/ledger/detail/ApplyStateTable.cpp b/src/libxrpl/ledger/ApplyStateTable.cpp similarity index 99% rename from src/xrpld/ledger/detail/ApplyStateTable.cpp rename to src/libxrpl/ledger/ApplyStateTable.cpp index 2a740093d9..7b041939d4 100644 --- a/src/xrpld/ledger/detail/ApplyStateTable.cpp +++ b/src/libxrpl/ledger/ApplyStateTable.cpp @@ -17,11 +17,10 @@ */ //============================================================================== -#include - #include #include #include +#include #include #include diff --git a/src/xrpld/ledger/detail/ApplyView.cpp b/src/libxrpl/ledger/ApplyView.cpp similarity index 99% rename from src/xrpld/ledger/detail/ApplyView.cpp rename to src/libxrpl/ledger/ApplyView.cpp index 3191b47cbb..8a0fd51bd8 100644 --- a/src/xrpld/ledger/detail/ApplyView.cpp +++ b/src/libxrpl/ledger/ApplyView.cpp @@ -17,10 +17,9 @@ */ //============================================================================== -#include - #include #include +#include #include namespace ripple { diff --git a/src/xrpld/ledger/detail/ApplyViewBase.cpp b/src/libxrpl/ledger/ApplyViewBase.cpp similarity index 98% rename from src/xrpld/ledger/detail/ApplyViewBase.cpp rename to src/libxrpl/ledger/ApplyViewBase.cpp index 1d93eae7aa..dd0e043474 100644 --- a/src/xrpld/ledger/detail/ApplyViewBase.cpp +++ b/src/libxrpl/ledger/ApplyViewBase.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include namespace ripple { namespace detail { diff --git a/src/xrpld/ledger/detail/ApplyViewImpl.cpp b/src/libxrpl/ledger/ApplyViewImpl.cpp similarity index 97% rename from src/xrpld/ledger/detail/ApplyViewImpl.cpp rename to src/libxrpl/ledger/ApplyViewImpl.cpp index 3fd9478b54..9429bcee6e 100644 --- a/src/xrpld/ledger/detail/ApplyViewImpl.cpp +++ b/src/libxrpl/ledger/ApplyViewImpl.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include namespace ripple { diff --git a/src/xrpld/ledger/detail/BookDirs.cpp b/src/libxrpl/ledger/BookDirs.cpp similarity index 98% rename from src/xrpld/ledger/detail/BookDirs.cpp rename to src/libxrpl/ledger/BookDirs.cpp index 41a14945a6..f777d23aca 100644 --- a/src/xrpld/ledger/detail/BookDirs.cpp +++ b/src/libxrpl/ledger/BookDirs.cpp @@ -18,9 +18,8 @@ */ //============================================================================== -#include -#include - +#include +#include #include namespace ripple { diff --git a/src/xrpld/ledger/detail/CachedView.cpp b/src/libxrpl/ledger/CachedView.cpp similarity index 98% rename from src/xrpld/ledger/detail/CachedView.cpp rename to src/libxrpl/ledger/CachedView.cpp index 365d63e400..0bec9094d2 100644 --- a/src/xrpld/ledger/detail/CachedView.cpp +++ b/src/libxrpl/ledger/CachedView.cpp @@ -17,9 +17,8 @@ */ //============================================================================== -#include - #include +#include namespace ripple { namespace detail { diff --git a/src/xrpld/app/misc/CredentialHelpers.cpp b/src/libxrpl/ledger/CredentialHelpers.cpp similarity index 99% rename from src/xrpld/app/misc/CredentialHelpers.cpp rename to src/libxrpl/ledger/CredentialHelpers.cpp index 6d1f9f78c5..965d6f6911 100644 --- a/src/xrpld/app/misc/CredentialHelpers.cpp +++ b/src/libxrpl/ledger/CredentialHelpers.cpp @@ -17,9 +17,8 @@ */ //============================================================================== -#include -#include - +#include +#include #include #include diff --git a/src/xrpld/ledger/detail/Dir.cpp b/src/libxrpl/ledger/Dir.cpp similarity index 99% rename from src/xrpld/ledger/detail/Dir.cpp rename to src/libxrpl/ledger/Dir.cpp index 01d4487276..ea57369495 100644 --- a/src/xrpld/ledger/detail/Dir.cpp +++ b/src/libxrpl/ledger/Dir.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include namespace ripple { diff --git a/src/xrpld/ledger/detail/OpenView.cpp b/src/libxrpl/ledger/OpenView.cpp similarity index 99% rename from src/xrpld/ledger/detail/OpenView.cpp rename to src/libxrpl/ledger/OpenView.cpp index 73e502a5e2..c40434b38d 100644 --- a/src/xrpld/ledger/detail/OpenView.cpp +++ b/src/libxrpl/ledger/OpenView.cpp @@ -17,9 +17,8 @@ */ //============================================================================== -#include - #include +#include namespace ripple { diff --git a/src/xrpld/ledger/detail/PaymentSandbox.cpp b/src/libxrpl/ledger/PaymentSandbox.cpp similarity index 99% rename from src/xrpld/ledger/detail/PaymentSandbox.cpp rename to src/libxrpl/ledger/PaymentSandbox.cpp index 3eab845472..ba59b573fa 100644 --- a/src/xrpld/ledger/detail/PaymentSandbox.cpp +++ b/src/libxrpl/ledger/PaymentSandbox.cpp @@ -17,11 +17,9 @@ */ //============================================================================== -#include -#include -#include - #include +#include +#include #include namespace ripple { diff --git a/src/xrpld/ledger/detail/RawStateTable.cpp b/src/libxrpl/ledger/RawStateTable.cpp similarity index 99% rename from src/xrpld/ledger/detail/RawStateTable.cpp rename to src/libxrpl/ledger/RawStateTable.cpp index f19eed8297..e6b1467581 100644 --- a/src/xrpld/ledger/detail/RawStateTable.cpp +++ b/src/libxrpl/ledger/RawStateTable.cpp @@ -17,9 +17,8 @@ */ //============================================================================== -#include - #include +#include namespace ripple { namespace detail { diff --git a/src/xrpld/ledger/detail/ReadView.cpp b/src/libxrpl/ledger/ReadView.cpp similarity index 98% rename from src/xrpld/ledger/detail/ReadView.cpp rename to src/libxrpl/ledger/ReadView.cpp index 69a4b5d6a9..449a5a9cec 100644 --- a/src/xrpld/ledger/detail/ReadView.cpp +++ b/src/libxrpl/ledger/ReadView.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include namespace ripple { diff --git a/src/xrpld/ledger/detail/View.cpp b/src/libxrpl/ledger/View.cpp similarity index 99% rename from src/xrpld/ledger/detail/View.cpp rename to src/libxrpl/ledger/View.cpp index 62359caca0..3e27741c2f 100644 --- a/src/xrpld/ledger/detail/View.cpp +++ b/src/libxrpl/ledger/View.cpp @@ -17,14 +17,13 @@ */ //============================================================================== -#include -#include -#include - #include #include #include #include +#include +#include +#include #include #include #include diff --git a/src/test/app/AMMExtended_test.cpp b/src/test/app/AMMExtended_test.cpp index a202ba18d1..dcbebd2dc3 100644 --- a/src/test/app/AMMExtended_test.cpp +++ b/src/test/app/AMMExtended_test.cpp @@ -29,8 +29,8 @@ #include #include #include -#include +#include #include #include diff --git a/src/test/app/Credentials_test.cpp b/src/test/app/Credentials_test.cpp index a583050500..102d516b89 100644 --- a/src/test/app/Credentials_test.cpp +++ b/src/test/app/Credentials_test.cpp @@ -19,10 +19,9 @@ #include -#include -#include - #include +#include +#include #include #include #include diff --git a/src/test/app/EscrowToken_test.cpp b/src/test/app/EscrowToken_test.cpp index e930c2f9ac..6caedb53f1 100644 --- a/src/test/app/EscrowToken_test.cpp +++ b/src/test/app/EscrowToken_test.cpp @@ -20,9 +20,9 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/test/app/Escrow_test.cpp b/src/test/app/Escrow_test.cpp index 3eaf0f13ea..cea3a835a6 100644 --- a/src/test/app/Escrow_test.cpp +++ b/src/test/app/Escrow_test.cpp @@ -20,8 +20,8 @@ #include #include -#include +#include #include #include #include @@ -253,6 +253,14 @@ struct Escrow_test : public beast::unit_test::suite BEAST_EXPECT(sle); BEAST_EXPECT((*sle)[sfSourceTag] == 1); BEAST_EXPECT((*sle)[sfDestinationTag] == 2); + if (features[fixIncludeKeyletFields]) + { + BEAST_EXPECT((*sle)[sfSequence] == seq); + } + else + { + BEAST_EXPECT(!sle->isFieldPresent(sfSequence)); + } } void @@ -1718,6 +1726,7 @@ public: FeatureBitset const all{testable_amendments()}; testWithFeats(all); testWithFeats(all - featureTokenEscrow); + testTags(all - fixIncludeKeyletFields); } }; diff --git a/src/test/app/Flow_test.cpp b/src/test/app/Flow_test.cpp index 0f40d70b57..23095b0145 100644 --- a/src/test/app/Flow_test.cpp +++ b/src/test/app/Flow_test.cpp @@ -23,10 +23,10 @@ #include #include #include -#include -#include #include +#include +#include #include namespace ripple { diff --git a/src/test/app/LedgerHistory_test.cpp b/src/test/app/LedgerHistory_test.cpp index 7b1910bd4d..1d440f6420 100644 --- a/src/test/app/LedgerHistory_test.cpp +++ b/src/test/app/LedgerHistory_test.cpp @@ -23,10 +23,10 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/src/test/app/LoadFeeTrack_test.cpp b/src/test/app/LoadFeeTrack_test.cpp index 8a88e0273f..80110b073d 100644 --- a/src/test/app/LoadFeeTrack_test.cpp +++ b/src/test/app/LoadFeeTrack_test.cpp @@ -19,9 +19,9 @@ #include #include -#include #include +#include namespace ripple { diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index 1410370c33..e9740e67de 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -2871,8 +2871,8 @@ class MPToken_test : public beast::unit_test::suite MPTTester mptAlice(env, alice, {.holders = {bob}}); mptAlice.create( {.ownerCount = 1, - .mutableFlags = tfMPTCanMutateMetadata | - tfMPTCanMutateCanLock | tfMPTCanMutateTransferFee}); + .mutableFlags = tmfMPTCanMutateMetadata | + tmfMPTCanMutateCanLock | tmfMPTCanMutateTransferFee}); // Setting flags is not allowed when MutableFlags is present mptAlice.set( @@ -2906,7 +2906,7 @@ class MPToken_test : public beast::unit_test::suite .ownerCount = 1, .flags = tfMPTCanTransfer, .mutableFlags = - tfMPTCanMutateTransferFee | tfMPTCanMutateMetadata}); + tmfMPTCanMutateTransferFee | tmfMPTCanMutateMetadata}); mptAlice.set( {.account = alice, @@ -2943,15 +2943,15 @@ class MPToken_test : public beast::unit_test::suite auto const mptID = makeMptID(env.seq(alice), alice); auto const flagCombinations = { - tfMPTSetCanLock | tfMPTClearCanLock, - tfMPTSetRequireAuth | tfMPTClearRequireAuth, - tfMPTSetCanEscrow | tfMPTClearCanEscrow, - tfMPTSetCanTrade | tfMPTClearCanTrade, - tfMPTSetCanTransfer | tfMPTClearCanTransfer, - tfMPTSetCanClawback | tfMPTClearCanClawback, - tfMPTSetCanLock | tfMPTClearCanLock | tfMPTClearCanTrade, - tfMPTSetCanTransfer | tfMPTClearCanTransfer | - tfMPTSetCanEscrow | tfMPTClearCanClawback}; + tmfMPTSetCanLock | tmfMPTClearCanLock, + tmfMPTSetRequireAuth | tmfMPTClearRequireAuth, + tmfMPTSetCanEscrow | tmfMPTClearCanEscrow, + tmfMPTSetCanTrade | tmfMPTClearCanTrade, + tmfMPTSetCanTransfer | tmfMPTClearCanTransfer, + tmfMPTSetCanClawback | tmfMPTClearCanClawback, + tmfMPTSetCanLock | tmfMPTClearCanLock | tmfMPTClearCanTrade, + tmfMPTSetCanTransfer | tmfMPTClearCanTransfer | + tmfMPTSetCanEscrow | tmfMPTClearCanClawback}; for (auto const& mutableFlags : flagCombinations) { @@ -2971,18 +2971,18 @@ class MPToken_test : public beast::unit_test::suite mptAlice.create({.ownerCount = 1}); auto const mutableFlags = { - tfMPTSetCanLock, - tfMPTClearCanLock, - tfMPTSetRequireAuth, - tfMPTClearRequireAuth, - tfMPTSetCanEscrow, - tfMPTClearCanEscrow, - tfMPTSetCanTrade, - tfMPTClearCanTrade, - tfMPTSetCanTransfer, - tfMPTClearCanTransfer, - tfMPTSetCanClawback, - tfMPTClearCanClawback}; + tmfMPTSetCanLock, + tmfMPTClearCanLock, + tmfMPTSetRequireAuth, + tmfMPTClearRequireAuth, + tmfMPTSetCanEscrow, + tmfMPTClearCanEscrow, + tmfMPTSetCanTrade, + tmfMPTClearCanTrade, + tmfMPTSetCanTransfer, + tmfMPTClearCanTransfer, + tmfMPTSetCanClawback, + tmfMPTClearCanClawback}; for (auto const& mutableFlag : mutableFlags) { @@ -2999,7 +2999,7 @@ class MPToken_test : public beast::unit_test::suite MPTTester mptAlice(env, alice, {.holders = {bob}}); mptAlice.create( - {.ownerCount = 1, .mutableFlags = tfMPTCanMutateMetadata}); + {.ownerCount = 1, .mutableFlags = tmfMPTCanMutateMetadata}); std::string metadata(maxMPTokenMetadataLength + 1, 'a'); mptAlice.set( @@ -3025,7 +3025,7 @@ class MPToken_test : public beast::unit_test::suite auto const mptID = makeMptID(env.seq(alice), alice); mptAlice.create( - {.ownerCount = 1, .mutableFlags = tfMPTCanMutateTransferFee}); + {.ownerCount = 1, .mutableFlags = tmfMPTCanMutateTransferFee}); mptAlice.set( {.account = alice, @@ -3045,13 +3045,13 @@ class MPToken_test : public beast::unit_test::suite .ownerCount = 1, .flags = tfMPTCanTransfer, .mutableFlags = - tfMPTCanMutateTransferFee | tfMPTCanMutateCanTransfer}); + tmfMPTCanMutateTransferFee | tmfMPTCanMutateCanTransfer}); // Can not set non-zero transfer fee and clear MPTCanTransfer at the // same time mptAlice.set( {.account = alice, - .mutableFlags = tfMPTClearCanTransfer, + .mutableFlags = tmfMPTClearCanTransfer, .transferFee = 1, .err = temMALFORMED}); @@ -3060,7 +3060,7 @@ class MPToken_test : public beast::unit_test::suite // be removed. mptAlice.set( {.account = alice, - .mutableFlags = tfMPTClearCanTransfer, + .mutableFlags = tmfMPTClearCanTransfer, .transferFee = 0}); BEAST_EXPECT(!mptAlice.isTransferFeePresent()); } @@ -3073,7 +3073,7 @@ class MPToken_test : public beast::unit_test::suite mptAlice.create( {.ownerCount = 1, .mutableFlags = - tfMPTCanMutateTransferFee | tfMPTCanMutateCanTransfer}); + tmfMPTCanMutateTransferFee | tmfMPTCanMutateCanTransfer}); mptAlice.set( {.account = alice, @@ -3085,7 +3085,7 @@ class MPToken_test : public beast::unit_test::suite // fee can be set in a separate transaction. mptAlice.set( {.account = alice, - .mutableFlags = tfMPTSetCanTransfer, + .mutableFlags = tmfMPTSetCanTransfer, .transferFee = 100, .err = tecNO_PERMISSION}); } @@ -3116,8 +3116,8 @@ class MPToken_test : public beast::unit_test::suite mptAlice.create( {.ownerCount = 1, - .mutableFlags = tfMPTCanMutateCanTrade | - tfMPTCanMutateCanTransfer | tfMPTCanMutateMetadata}); + .mutableFlags = tmfMPTCanMutateCanTrade | + tmfMPTCanMutateCanTransfer | tmfMPTCanMutateMetadata}); // Can not mutate transfer fee mptAlice.set( @@ -3126,14 +3126,14 @@ class MPToken_test : public beast::unit_test::suite .err = tecNO_PERMISSION}); auto const invalidFlags = { - tfMPTSetCanLock, - tfMPTClearCanLock, - tfMPTSetRequireAuth, - tfMPTClearRequireAuth, - tfMPTSetCanEscrow, - tfMPTClearCanEscrow, - tfMPTSetCanClawback, - tfMPTClearCanClawback}; + tmfMPTSetCanLock, + tmfMPTClearCanLock, + tmfMPTSetRequireAuth, + tmfMPTClearRequireAuth, + tmfMPTSetCanEscrow, + tmfMPTClearCanEscrow, + tmfMPTSetCanClawback, + tmfMPTClearCanClawback}; // Can not mutate flags which are not mutable for (auto const& mutableFlag : invalidFlags) @@ -3145,15 +3145,15 @@ class MPToken_test : public beast::unit_test::suite } // Can mutate MPTCanTrade - mptAlice.set({.account = alice, .mutableFlags = tfMPTSetCanTrade}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTSetCanTrade}); mptAlice.set( - {.account = alice, .mutableFlags = tfMPTClearCanTrade}); + {.account = alice, .mutableFlags = tmfMPTClearCanTrade}); // Can mutate MPTCanTransfer mptAlice.set( - {.account = alice, .mutableFlags = tfMPTSetCanTransfer}); + {.account = alice, .mutableFlags = tmfMPTSetCanTransfer}); mptAlice.set( - {.account = alice, .mutableFlags = tfMPTClearCanTransfer}); + {.account = alice, .mutableFlags = tmfMPTClearCanTransfer}); // Can mutate metadata mptAlice.set({.account = alice, .metadata = "test"}); @@ -3176,7 +3176,7 @@ class MPToken_test : public beast::unit_test::suite mptAlice.create( {.metadata = "test", .ownerCount = 1, - .mutableFlags = tfMPTCanMutateMetadata}); + .mutableFlags = tmfMPTCanMutateMetadata}); std::vector metadatas = { "mutate metadata", @@ -3206,7 +3206,7 @@ class MPToken_test : public beast::unit_test::suite .metadata = "test", .ownerCount = 1, .flags = tfMPTCanTransfer, - .mutableFlags = tfMPTCanMutateTransferFee}); + .mutableFlags = tmfMPTCanMutateTransferFee}); for (std::uint16_t const fee : std::initializer_list{ 1, 10, 100, 200, 500, 1000, maxTransferFee}) @@ -3250,25 +3250,27 @@ class MPToken_test : public beast::unit_test::suite }; testFlagToggle( - tfMPTCanMutateCanLock, tfMPTCanLock, tfMPTClearCanLock); + tmfMPTCanMutateCanLock, tfMPTCanLock, tmfMPTClearCanLock); testFlagToggle( - tfMPTCanMutateRequireAuth, - tfMPTSetRequireAuth, - tfMPTClearRequireAuth); + tmfMPTCanMutateRequireAuth, + tmfMPTSetRequireAuth, + tmfMPTClearRequireAuth); testFlagToggle( - tfMPTCanMutateCanEscrow, - tfMPTSetCanEscrow, - tfMPTClearCanEscrow); + tmfMPTCanMutateCanEscrow, + tmfMPTSetCanEscrow, + tmfMPTClearCanEscrow); testFlagToggle( - tfMPTCanMutateCanTrade, tfMPTSetCanTrade, tfMPTClearCanTrade); + tmfMPTCanMutateCanTrade, + tmfMPTSetCanTrade, + tmfMPTClearCanTrade); testFlagToggle( - tfMPTCanMutateCanTransfer, - tfMPTSetCanTransfer, - tfMPTClearCanTransfer); + tmfMPTCanMutateCanTransfer, + tmfMPTSetCanTransfer, + tmfMPTClearCanTransfer); testFlagToggle( - tfMPTCanMutateCanClawback, - tfMPTSetCanClawback, - tfMPTClearCanClawback); + tmfMPTCanMutateCanClawback, + tmfMPTSetCanClawback, + tmfMPTClearCanClawback); } } @@ -3289,20 +3291,22 @@ class MPToken_test : public beast::unit_test::suite {.ownerCount = 1, .holderCount = 0, .flags = tfMPTCanLock | tfMPTCanTransfer, - .mutableFlags = tfMPTCanMutateCanLock | - tfMPTCanMutateCanTrade | tfMPTCanMutateTransferFee}); + .mutableFlags = tmfMPTCanMutateCanLock | + tmfMPTCanMutateCanTrade | tmfMPTCanMutateTransferFee}); mptAlice.authorize({.account = bob, .holderCount = 1}); // Lock bob's mptoken mptAlice.set({.account = alice, .holder = bob, .flags = tfMPTLock}); // Can mutate the mutable flags and fields - mptAlice.set({.account = alice, .mutableFlags = tfMPTClearCanLock}); - mptAlice.set({.account = alice, .mutableFlags = tfMPTSetCanLock}); - mptAlice.set({.account = alice, .mutableFlags = tfMPTClearCanLock}); - mptAlice.set({.account = alice, .mutableFlags = tfMPTSetCanTrade}); mptAlice.set( - {.account = alice, .mutableFlags = tfMPTClearCanTrade}); + {.account = alice, .mutableFlags = tmfMPTClearCanLock}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTSetCanLock}); + mptAlice.set( + {.account = alice, .mutableFlags = tmfMPTClearCanLock}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTSetCanTrade}); + mptAlice.set( + {.account = alice, .mutableFlags = tmfMPTClearCanTrade}); mptAlice.set({.account = alice, .transferFee = 200}); } @@ -3314,21 +3318,23 @@ class MPToken_test : public beast::unit_test::suite {.ownerCount = 1, .holderCount = 0, .flags = tfMPTCanLock, - .mutableFlags = tfMPTCanMutateCanLock | - tfMPTCanMutateCanClawback | tfMPTCanMutateMetadata}); + .mutableFlags = tmfMPTCanMutateCanLock | + tmfMPTCanMutateCanClawback | tmfMPTCanMutateMetadata}); mptAlice.authorize({.account = bob, .holderCount = 1}); // Lock issuance mptAlice.set({.account = alice, .flags = tfMPTLock}); // Can mutate the mutable flags and fields - mptAlice.set({.account = alice, .mutableFlags = tfMPTClearCanLock}); - mptAlice.set({.account = alice, .mutableFlags = tfMPTSetCanLock}); - mptAlice.set({.account = alice, .mutableFlags = tfMPTClearCanLock}); mptAlice.set( - {.account = alice, .mutableFlags = tfMPTSetCanClawback}); + {.account = alice, .mutableFlags = tmfMPTClearCanLock}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTSetCanLock}); mptAlice.set( - {.account = alice, .mutableFlags = tfMPTClearCanClawback}); + {.account = alice, .mutableFlags = tmfMPTClearCanLock}); + mptAlice.set( + {.account = alice, .mutableFlags = tmfMPTSetCanClawback}); + mptAlice.set( + {.account = alice, .mutableFlags = tmfMPTClearCanClawback}); mptAlice.set({.account = alice, .metadata = "mutate"}); } @@ -3340,8 +3346,8 @@ class MPToken_test : public beast::unit_test::suite {.ownerCount = 1, .holderCount = 0, .flags = tfMPTCanLock, - .mutableFlags = tfMPTCanMutateCanLock | - tfMPTCanMutateCanClawback | tfMPTCanMutateMetadata}); + .mutableFlags = tmfMPTCanMutateCanLock | + tmfMPTCanMutateCanClawback | tmfMPTCanMutateMetadata}); mptAlice.authorize({.account = bob, .holderCount = 1}); // Can lock and unlock @@ -3352,7 +3358,8 @@ class MPToken_test : public beast::unit_test::suite {.account = alice, .holder = bob, .flags = tfMPTUnlock}); // Clear lsfMPTCanLock - mptAlice.set({.account = alice, .mutableFlags = tfMPTClearCanLock}); + mptAlice.set( + {.account = alice, .mutableFlags = tmfMPTClearCanLock}); // Can not lock or unlock mptAlice.set( @@ -3375,7 +3382,7 @@ class MPToken_test : public beast::unit_test::suite .err = tecNO_PERMISSION}); // Set MPTCanLock again - mptAlice.set({.account = alice, .mutableFlags = tfMPTSetCanLock}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTSetCanLock}); // Can lock and unlock again mptAlice.set({.account = alice, .flags = tfMPTLock}); @@ -3400,7 +3407,7 @@ class MPToken_test : public beast::unit_test::suite mptAlice.create( {.ownerCount = 1, .flags = tfMPTRequireAuth, - .mutableFlags = tfMPTCanMutateRequireAuth}); + .mutableFlags = tmfMPTCanMutateRequireAuth}); mptAlice.authorize({.account = bob}); mptAlice.authorize({.account = alice, .holder = bob}); @@ -3416,13 +3423,14 @@ class MPToken_test : public beast::unit_test::suite mptAlice.pay(bob, alice, 100, tecNO_AUTH); // Clear RequireAuth - mptAlice.set({.account = alice, .mutableFlags = tfMPTClearRequireAuth}); + mptAlice.set( + {.account = alice, .mutableFlags = tmfMPTClearRequireAuth}); // Can pay to bob mptAlice.pay(alice, bob, 1000); // Set RequireAuth again - mptAlice.set({.account = alice, .mutableFlags = tfMPTSetRequireAuth}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTSetRequireAuth}); // Can not pay to bob since he is not authorized mptAlice.pay(bob, alice, 100, tecNO_AUTH); @@ -3452,7 +3460,7 @@ class MPToken_test : public beast::unit_test::suite {.ownerCount = 1, .holderCount = 0, .flags = tfMPTCanTransfer, - .mutableFlags = tfMPTCanMutateCanEscrow}); + .mutableFlags = tmfMPTCanMutateCanEscrow}); mptAlice.authorize({.account = carol}); mptAlice.authorize({.account = bob}); @@ -3469,14 +3477,14 @@ class MPToken_test : public beast::unit_test::suite ter(tecNO_PERMISSION)); // MPTCanEscrow is enabled now - mptAlice.set({.account = alice, .mutableFlags = tfMPTSetCanEscrow}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTSetCanEscrow}); env(escrow::create(carol, bob, MPT(3)), escrow::condition(escrow::cb1), escrow::finish_time(env.now() + 1s), fee(baseFee * 150)); // Clear MPTCanEscrow - mptAlice.set({.account = alice, .mutableFlags = tfMPTClearCanEscrow}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTClearCanEscrow}); env(escrow::create(carol, bob, MPT(3)), escrow::condition(escrow::cb1), escrow::finish_time(env.now() + 1s), @@ -3501,7 +3509,7 @@ class MPToken_test : public beast::unit_test::suite mptAlice.create( {.ownerCount = 1, .mutableFlags = - tfMPTCanMutateCanTransfer | tfMPTCanMutateTransferFee}); + tmfMPTCanMutateCanTransfer | tmfMPTCanMutateTransferFee}); mptAlice.authorize({.account = bob}); mptAlice.authorize({.account = carol}); @@ -3522,13 +3530,13 @@ class MPToken_test : public beast::unit_test::suite // MPTCanTransfer at the same time mptAlice.set( {.account = alice, - .mutableFlags = tfMPTSetCanTransfer, + .mutableFlags = tmfMPTSetCanTransfer, .transferFee = 100, .err = tecNO_PERMISSION}); // Alice sets MPTCanTransfer mptAlice.set( - {.account = alice, .mutableFlags = tfMPTSetCanTransfer}); + {.account = alice, .mutableFlags = tmfMPTSetCanTransfer}); // Can set transfer fee now BEAST_EXPECT(!mptAlice.isTransferFeePresent()); @@ -3540,7 +3548,7 @@ class MPToken_test : public beast::unit_test::suite // Alice clears MPTCanTransfer mptAlice.set( - {.account = alice, .mutableFlags = tfMPTClearCanTransfer}); + {.account = alice, .mutableFlags = tmfMPTClearCanTransfer}); // TransferFee field is removed when MPTCanTransfer is cleared BEAST_EXPECT(!mptAlice.isTransferFeePresent()); @@ -3550,7 +3558,7 @@ class MPToken_test : public beast::unit_test::suite } // Can set transfer fee to zero when MPTCanTransfer is not set, but - // tfMPTCanMutateTransferFee is set. + // tmfMPTCanMutateTransferFee is set. { Env env{*this, features}; @@ -3560,13 +3568,13 @@ class MPToken_test : public beast::unit_test::suite .ownerCount = 1, .flags = tfMPTCanTransfer, .mutableFlags = - tfMPTCanMutateTransferFee | tfMPTCanMutateCanTransfer}); + tmfMPTCanMutateTransferFee | tmfMPTCanMutateCanTransfer}); BEAST_EXPECT(mptAlice.checkTransferFee(100)); // Clear MPTCanTransfer and transfer fee is removed mptAlice.set( - {.account = alice, .mutableFlags = tfMPTClearCanTransfer}); + {.account = alice, .mutableFlags = tmfMPTClearCanTransfer}); BEAST_EXPECT(!mptAlice.isTransferFeePresent()); // Can still set transfer fee to zero, although it is already zero @@ -3592,7 +3600,7 @@ class MPToken_test : public beast::unit_test::suite mptAlice.create( {.ownerCount = 1, .holderCount = 0, - .mutableFlags = tfMPTCanMutateCanClawback}); + .mutableFlags = tmfMPTCanMutateCanClawback}); // Bob creates an MPToken mptAlice.authorize({.account = bob}); @@ -3604,13 +3612,14 @@ class MPToken_test : public beast::unit_test::suite mptAlice.claw(alice, bob, 1, tecNO_PERMISSION); // Enable MPTCanClawback - mptAlice.set({.account = alice, .mutableFlags = tfMPTSetCanClawback}); + mptAlice.set({.account = alice, .mutableFlags = tmfMPTSetCanClawback}); // Can clawback now mptAlice.claw(alice, bob, 1); // Clear MPTCanClawback - mptAlice.set({.account = alice, .mutableFlags = tfMPTClearCanClawback}); + mptAlice.set( + {.account = alice, .mutableFlags = tmfMPTClearCanClawback}); // Can not clawback mptAlice.claw(alice, bob, 1, tecNO_PERMISSION); diff --git a/src/test/app/MultiSign_test.cpp b/src/test/app/MultiSign_test.cpp index 571ec33417..776e163cd4 100644 --- a/src/test/app/MultiSign_test.cpp +++ b/src/test/app/MultiSign_test.cpp @@ -63,7 +63,7 @@ class MultiSign_test : public beast::unit_test::suite public: void - test_noReserve(FeatureBitset features) + testNoReserve(FeatureBitset features) { testcase("No Reserve"); @@ -133,7 +133,7 @@ public: } void - test_signerListSet(FeatureBitset features) + testSignerListSet(FeatureBitset features) { testcase("SignerListSet"); @@ -215,7 +215,7 @@ public: } void - test_phantomSigners(FeatureBitset features) + testPhantomSigners(FeatureBitset features) { testcase("Phantom Signers"); @@ -282,7 +282,7 @@ public: } void - test_fee(FeatureBitset features) + testFee(FeatureBitset features) { testcase("Fee"); @@ -346,7 +346,7 @@ public: } void - test_misorderedSigners(FeatureBitset features) + testMisorderedSigners(FeatureBitset features) { testcase("Misordered Signers"); @@ -374,7 +374,7 @@ public: } void - test_masterSigners(FeatureBitset features) + testMasterSigners(FeatureBitset features) { testcase("Master Signers"); @@ -429,7 +429,7 @@ public: } void - test_regularSigners(FeatureBitset features) + testRegularSigners(FeatureBitset features) { testcase("Regular Signers"); @@ -494,7 +494,7 @@ public: } void - test_regularSignersUsingSubmitMulti(FeatureBitset features) + testRegularSignersUsingSubmitMulti(FeatureBitset features) { testcase("Regular Signers Using submit_multisigned"); @@ -734,7 +734,7 @@ public: } void - test_heterogeneousSigners(FeatureBitset features) + testHeterogeneousSigners(FeatureBitset features) { testcase("Heterogenious Signers"); @@ -881,7 +881,7 @@ public: // We want to always leave an account signable. Make sure the that we // disallow removing the last way a transaction may be signed. void - test_keyDisable(FeatureBitset features) + testKeyDisable(FeatureBitset features) { testcase("Key Disable"); @@ -963,7 +963,7 @@ public: // Verify that the first regular key can be made for free using the // master key, but not when multisigning. void - test_regKey(FeatureBitset features) + testRegKey(FeatureBitset features) { testcase("Regular Key"); @@ -1000,7 +1000,7 @@ public: // See if every kind of transaction can be successfully multi-signed. void - test_txTypes(FeatureBitset features) + testTxTypes(FeatureBitset features) { testcase("Transaction Types"); @@ -1089,7 +1089,7 @@ public: } void - test_badSignatureText(FeatureBitset features) + testBadSignatureText(FeatureBitset features) { testcase("Bad Signature Text"); @@ -1285,7 +1285,7 @@ public: } void - test_noMultiSigners(FeatureBitset features) + testNoMultiSigners(FeatureBitset features) { testcase("No Multisigners"); @@ -1304,7 +1304,7 @@ public: } void - test_multisigningMultisigner(FeatureBitset features) + testMultisigningMultisigner(FeatureBitset features) { testcase("Multisigning multisigner"); @@ -1381,7 +1381,7 @@ public: } void - test_signForHash(FeatureBitset features) + testSignForHash(FeatureBitset features) { testcase("sign_for Hash"); @@ -1464,7 +1464,7 @@ public: } void - test_amendmentTransition() + testAmendmentTransition() { testcase("Amendment Transition"); @@ -1559,7 +1559,7 @@ public: } void - test_signersWithTickets(FeatureBitset features) + testSignersWithTickets(FeatureBitset features) { testcase("Signers With Tickets"); @@ -1600,7 +1600,7 @@ public: } void - test_signersWithTags(FeatureBitset features) + testSignersWithTags(FeatureBitset features) { if (!features[featureExpandedSignerList]) return; @@ -1680,7 +1680,7 @@ public: } void - test_signerListSetFlags(FeatureBitset features) + testSignerListSetFlags(FeatureBitset features) { using namespace test::jtx; @@ -1702,27 +1702,57 @@ public: env.close(); } + void + testSignerListObject(FeatureBitset features) + { + testcase("SignerList Object"); + + // Verify that the SignerList object is created correctly. + using namespace jtx; + Env env{*this, features}; + Account const alice{"alice", KeyType::ed25519}; + env.fund(XRP(1000), alice); + env.close(); + + // Attach phantom signers to alice. + env(signers(alice, 1, {{bogie, 1}, {demon, 1}})); + env.close(); + + // Verify that the SignerList object was created correctly. + auto const& sle = env.le(keylet::signers(alice.id())); + BEAST_EXPECT(sle); + BEAST_EXPECT(sle->getFieldArray(sfSignerEntries).size() == 2); + if (features[fixIncludeKeyletFields]) + { + BEAST_EXPECT((*sle)[sfOwner] == alice.id()); + } + else + { + BEAST_EXPECT(!sle->isFieldPresent(sfOwner)); + } + } + void testAll(FeatureBitset features) { - test_noReserve(features); - test_signerListSet(features); - test_phantomSigners(features); - test_fee(features); - test_misorderedSigners(features); - test_masterSigners(features); - test_regularSigners(features); - test_regularSignersUsingSubmitMulti(features); - test_heterogeneousSigners(features); - test_keyDisable(features); - test_regKey(features); - test_txTypes(features); - test_badSignatureText(features); - test_noMultiSigners(features); - test_multisigningMultisigner(features); - test_signForHash(features); - test_signersWithTickets(features); - test_signersWithTags(features); + testNoReserve(features); + testSignerListSet(features); + testPhantomSigners(features); + testFee(features); + testMisorderedSigners(features); + testMasterSigners(features); + testRegularSigners(features); + testRegularSignersUsingSubmitMulti(features); + testHeterogeneousSigners(features); + testKeyDisable(features); + testRegKey(features); + testTxTypes(features); + testBadSignatureText(features); + testNoMultiSigners(features); + testMultisigningMultisigner(features); + testSignForHash(features); + testSignersWithTickets(features); + testSignersWithTags(features); } void @@ -1739,10 +1769,13 @@ public: testAll(all - featureExpandedSignerList); testAll(all); - test_signerListSetFlags(all - fixInvalidTxFlags); - test_signerListSetFlags(all); + testSignerListSetFlags(all - fixInvalidTxFlags); + testSignerListSetFlags(all); - test_amendmentTransition(); + testSignerListObject(all - fixIncludeKeyletFields); + testSignerListObject(all); + + testAmendmentTransition(); } }; diff --git a/src/test/app/Oracle_test.cpp b/src/test/app/Oracle_test.cpp index fdd7ad941e..f0cde41394 100644 --- a/src/test/app/Oracle_test.cpp +++ b/src/test/app/Oracle_test.cpp @@ -398,7 +398,7 @@ private: } void - testCreate() + testCreate(FeatureBitset features) { testcase("Create"); using namespace jtx; @@ -413,18 +413,30 @@ private: env, {.owner = owner, .series = series, .fee = baseFee}); BEAST_EXPECT(oracle.exists()); BEAST_EXPECT(ownerCount(env, owner) == (count + adj)); + auto const entry = oracle.ledgerEntry(); + BEAST_EXPECT(entry[jss::node][jss::Owner] == owner.human()); + if (features[fixIncludeKeyletFields]) + { + BEAST_EXPECT( + entry[jss::node][jss::OracleDocumentID] == + oracle.documentID()); + } + else + { + BEAST_EXPECT(!entry[jss::node].isMember(jss::OracleDocumentID)); + } BEAST_EXPECT(oracle.expectLastUpdateTime(946694810)); }; { // owner count is adjusted by 1 - Env env(*this); + Env env(*this, features); test(env, {{"XRP", "USD", 740, 1}}, 1); } { // owner count is adjusted by 2 - Env env(*this); + Env env(*this, features); test( env, {{"XRP", "USD", 740, 1}, @@ -438,7 +450,7 @@ private: { // Different owner creates a new object - Env env(*this); + Env env(*this, features); auto const baseFee = static_cast(env.current()->fees().base.drops()); Account const some("some"); @@ -864,7 +876,8 @@ public: auto const all = testable_amendments(); testInvalidSet(); testInvalidDelete(); - testCreate(); + testCreate(all); + testCreate(all - fixIncludeKeyletFields); testDelete(); testUpdate(); testAmendment(); diff --git a/src/test/app/PayChan_test.cpp b/src/test/app/PayChan_test.cpp index 3a5d3d6ff5..fe9b70cf7f 100644 --- a/src/test/app/PayChan_test.cpp +++ b/src/test/app/PayChan_test.cpp @@ -19,10 +19,10 @@ #include -#include #include #include +#include #include #include #include @@ -1852,6 +1852,14 @@ struct PayChan_test : public beast::unit_test::suite BEAST_EXPECT(ownerDirCount(*env.current(), alice) == 1); BEAST_EXPECT(!inOwnerDir(*env.current(), bob, chanSle)); BEAST_EXPECT(ownerDirCount(*env.current(), bob) == 0); + if (features[fixIncludeKeyletFields]) + { + BEAST_EXPECT((*chanSle)[sfSequence] == env.seq(alice) - 1); + } + else + { + BEAST_EXPECT(!chanSle->isFieldPresent(sfSequence)); + } // close the channel env(claim(bob, chan), txflags(tfClose)); BEAST_EXPECT(!channelExists(*env.current(), chan)); @@ -2348,6 +2356,7 @@ public: testWithFeats(all - disallowIncoming); testWithFeats(all); testDepositAuthCreds(); + testMetaAndOwnership(all - fixIncludeKeyletFields); } }; diff --git a/src/test/app/PayStrand_test.cpp b/src/test/app/PayStrand_test.cpp index 936fe403d4..16a6861bfd 100644 --- a/src/test/app/PayStrand_test.cpp +++ b/src/test/app/PayStrand_test.cpp @@ -22,10 +22,10 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/src/test/app/PermissionedDEX_test.cpp b/src/test/app/PermissionedDEX_test.cpp index 3fd3a35f45..80c75a2daf 100644 --- a/src/test/app/PermissionedDEX_test.cpp +++ b/src/test/app/PermissionedDEX_test.cpp @@ -22,11 +22,11 @@ #include #include -#include #include #include #include +#include #include #include #include diff --git a/src/test/app/TheoreticalQuality_test.cpp b/src/test/app/TheoreticalQuality_test.cpp index a8713ec69a..814e6f7136 100644 --- a/src/test/app/TheoreticalQuality_test.cpp +++ b/src/test/app/TheoreticalQuality_test.cpp @@ -24,10 +24,10 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/src/test/app/Vault_test.cpp b/src/test/app/Vault_test.cpp index 60ac5f44bd..159bfd0796 100644 --- a/src/test/app/Vault_test.cpp +++ b/src/test/app/Vault_test.cpp @@ -21,14 +21,13 @@ #include #include -#include -#include - #include #include #include #include #include +#include +#include #include #include #include diff --git a/src/test/consensus/NegativeUNL_test.cpp b/src/test/consensus/NegativeUNL_test.cpp index b56b834726..cc38ea5ab6 100644 --- a/src/test/consensus/NegativeUNL_test.cpp +++ b/src/test/consensus/NegativeUNL_test.cpp @@ -24,9 +24,9 @@ #include #include #include -#include #include +#include namespace ripple { namespace test { diff --git a/src/test/jtx/impl/Oracle.cpp b/src/test/jtx/impl/Oracle.cpp index 721a1c299d..97a31cbb0c 100644 --- a/src/test/jtx/impl/Oracle.cpp +++ b/src/test/jtx/impl/Oracle.cpp @@ -317,10 +317,10 @@ Oracle::ledgerEntry( if (jr.isObject()) { + if (jr.isMember(jss::error)) + return jr; if (jr.isMember(jss::result) && jr[jss::result].isMember(jss::status)) return jr[jss::result]; - else if (jr.isMember(jss::error)) - return jr; } return Json::nullValue; } diff --git a/src/test/jtx/impl/mpt.cpp b/src/test/jtx/impl/mpt.cpp index f35b1b1ebb..f2f51492e3 100644 --- a/src/test/jtx/impl/mpt.cpp +++ b/src/test/jtx/impl/mpt.cpp @@ -265,34 +265,34 @@ MPTTester::set(MPTSet const& arg) if (arg.mutableFlags) { - if (*arg.mutableFlags & tfMPTSetCanLock) + if (*arg.mutableFlags & tmfMPTSetCanLock) flags |= lsfMPTCanLock; - else if (*arg.mutableFlags & tfMPTClearCanLock) + else if (*arg.mutableFlags & tmfMPTClearCanLock) flags &= ~lsfMPTCanLock; - if (*arg.mutableFlags & tfMPTSetRequireAuth) + if (*arg.mutableFlags & tmfMPTSetRequireAuth) flags |= lsfMPTRequireAuth; - else if (*arg.mutableFlags & tfMPTClearRequireAuth) + else if (*arg.mutableFlags & tmfMPTClearRequireAuth) flags &= ~lsfMPTRequireAuth; - if (*arg.mutableFlags & tfMPTSetCanEscrow) + if (*arg.mutableFlags & tmfMPTSetCanEscrow) flags |= lsfMPTCanEscrow; - else if (*arg.mutableFlags & tfMPTClearCanEscrow) + else if (*arg.mutableFlags & tmfMPTClearCanEscrow) flags &= ~lsfMPTCanEscrow; - if (*arg.mutableFlags & tfMPTSetCanClawback) + if (*arg.mutableFlags & tmfMPTSetCanClawback) flags |= lsfMPTCanClawback; - else if (*arg.mutableFlags & tfMPTClearCanClawback) + else if (*arg.mutableFlags & tmfMPTClearCanClawback) flags &= ~lsfMPTCanClawback; - if (*arg.mutableFlags & tfMPTSetCanTrade) + if (*arg.mutableFlags & tmfMPTSetCanTrade) flags |= lsfMPTCanTrade; - else if (*arg.mutableFlags & tfMPTClearCanTrade) + else if (*arg.mutableFlags & tmfMPTClearCanTrade) flags &= ~lsfMPTCanTrade; - if (*arg.mutableFlags & tfMPTSetCanTransfer) + if (*arg.mutableFlags & tmfMPTSetCanTransfer) flags |= lsfMPTCanTransfer; - else if (*arg.mutableFlags & tfMPTClearCanTransfer) + else if (*arg.mutableFlags & tmfMPTClearCanTransfer) flags &= ~lsfMPTCanTransfer; } } diff --git a/src/test/jtx/owners.h b/src/test/jtx/owners.h index 9408d67a9c..baf5d9da7d 100644 --- a/src/test/jtx/owners.h +++ b/src/test/jtx/owners.h @@ -22,8 +22,7 @@ #include -#include - +#include #include #include diff --git a/src/test/ledger/BookDirs_test.cpp b/src/test/ledger/BookDirs_test.cpp index 52b618e9a0..48ee92a6fd 100644 --- a/src/test/ledger/BookDirs_test.cpp +++ b/src/test/ledger/BookDirs_test.cpp @@ -17,8 +17,7 @@ #include -#include - +#include #include namespace ripple { diff --git a/src/test/ledger/Directory_test.cpp b/src/test/ledger/Directory_test.cpp index 9e8d40e0cc..fe8f04523f 100644 --- a/src/test/ledger/Directory_test.cpp +++ b/src/test/ledger/Directory_test.cpp @@ -17,10 +17,9 @@ #include -#include -#include - #include +#include +#include #include #include #include diff --git a/src/test/ledger/PaymentSandbox_test.cpp b/src/test/ledger/PaymentSandbox_test.cpp index 26b06a0034..db7fbed019 100644 --- a/src/test/ledger/PaymentSandbox_test.cpp +++ b/src/test/ledger/PaymentSandbox_test.cpp @@ -19,10 +19,9 @@ #include -#include -#include -#include - +#include +#include +#include #include #include diff --git a/src/test/ledger/SkipList_test.cpp b/src/test/ledger/SkipList_test.cpp index c2088d77cf..e0f4049c73 100644 --- a/src/test/ledger/SkipList_test.cpp +++ b/src/test/ledger/SkipList_test.cpp @@ -20,9 +20,9 @@ #include #include -#include #include +#include namespace ripple { namespace test { diff --git a/src/test/ledger/View_test.cpp b/src/test/ledger/View_test.cpp index 4af3e37ce2..17d3244aa2 100644 --- a/src/test/ledger/View_test.cpp +++ b/src/test/ledger/View_test.cpp @@ -21,11 +21,11 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/src/xrpld/app/consensus/RCLCxLedger.h b/src/xrpld/app/consensus/RCLCxLedger.h index cd14c30a94..f9df1fe41a 100644 --- a/src/xrpld/app/consensus/RCLCxLedger.h +++ b/src/xrpld/app/consensus/RCLCxLedger.h @@ -22,8 +22,8 @@ #include #include -#include +#include #include namespace ripple { diff --git a/src/xrpld/app/ledger/BuildLedger.h b/src/xrpld/app/ledger/BuildLedger.h index 2ec571773c..980fe82ed8 100644 --- a/src/xrpld/app/ledger/BuildLedger.h +++ b/src/xrpld/app/ledger/BuildLedger.h @@ -20,10 +20,9 @@ #ifndef RIPPLE_APP_LEDGER_BUILD_LEDGER_H_INCLUDED #define RIPPLE_APP_LEDGER_BUILD_LEDGER_H_INCLUDED -#include - #include #include +#include namespace ripple { diff --git a/src/xrpld/app/ledger/Ledger.h b/src/xrpld/app/ledger/Ledger.h index 81c26526e5..552f59ff19 100644 --- a/src/xrpld/app/ledger/Ledger.h +++ b/src/xrpld/app/ledger/Ledger.h @@ -22,12 +22,12 @@ #include #include -#include -#include #include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/app/ledger/LocalTxs.h b/src/xrpld/app/ledger/LocalTxs.h index 391bb4f7ef..2d202a5b60 100644 --- a/src/xrpld/app/ledger/LocalTxs.h +++ b/src/xrpld/app/ledger/LocalTxs.h @@ -21,7 +21,8 @@ #define RIPPLE_APP_LEDGER_LOCALTXS_H_INCLUDED #include -#include + +#include #include diff --git a/src/xrpld/app/ledger/OpenLedger.h b/src/xrpld/app/ledger/OpenLedger.h index 9fe56ff488..9383a53575 100644 --- a/src/xrpld/app/ledger/OpenLedger.h +++ b/src/xrpld/app/ledger/OpenLedger.h @@ -23,13 +23,13 @@ #include #include #include -#include -#include #include #include #include #include +#include +#include #include diff --git a/src/xrpld/app/ledger/detail/OpenLedger.cpp b/src/xrpld/app/ledger/detail/OpenLedger.cpp index 2c98caaa6d..5bba544e31 100644 --- a/src/xrpld/app/ledger/detail/OpenLedger.cpp +++ b/src/xrpld/app/ledger/detail/OpenLedger.cpp @@ -22,10 +22,10 @@ #include #include #include -#include #include #include +#include #include #include diff --git a/src/xrpld/app/misc/AMMUtils.h b/src/xrpld/app/misc/AMMUtils.h index 2a9f82ae60..d89085b116 100644 --- a/src/xrpld/app/misc/AMMUtils.h +++ b/src/xrpld/app/misc/AMMUtils.h @@ -20,10 +20,9 @@ #ifndef RIPPLE_APP_MISC_AMMUTILS_H_INCLUDED #define RIPPLE_APP_MISC_AMMUTILS_H_INCLUDED -#include - #include #include +#include #include #include #include diff --git a/src/xrpld/app/misc/FeeVote.h b/src/xrpld/app/misc/FeeVote.h index 35f723aa02..543456785a 100644 --- a/src/xrpld/app/misc/FeeVote.h +++ b/src/xrpld/app/misc/FeeVote.h @@ -20,9 +20,9 @@ #ifndef RIPPLE_APP_MISC_FEEVOTE_H_INCLUDED #define RIPPLE_APP_MISC_FEEVOTE_H_INCLUDED -#include #include +#include #include namespace ripple { diff --git a/src/xrpld/app/misc/NetworkOPs.h b/src/xrpld/app/misc/NetworkOPs.h index 9587d63b3a..bec0ad2341 100644 --- a/src/xrpld/app/misc/NetworkOPs.h +++ b/src/xrpld/app/misc/NetworkOPs.h @@ -23,9 +23,9 @@ #include #include #include -#include #include +#include #include #include diff --git a/src/xrpld/app/misc/PermissionedDEXHelpers.cpp b/src/xrpld/app/misc/PermissionedDEXHelpers.cpp index 4251ac1519..279ef8d7e9 100644 --- a/src/xrpld/app/misc/PermissionedDEXHelpers.cpp +++ b/src/xrpld/app/misc/PermissionedDEXHelpers.cpp @@ -17,9 +17,10 @@ */ //============================================================================== -#include #include +#include + namespace ripple { namespace permissioned_dex { diff --git a/src/xrpld/app/misc/PermissionedDEXHelpers.h b/src/xrpld/app/misc/PermissionedDEXHelpers.h index 1b3a0323fd..409b32f4ba 100644 --- a/src/xrpld/app/misc/PermissionedDEXHelpers.h +++ b/src/xrpld/app/misc/PermissionedDEXHelpers.h @@ -18,7 +18,7 @@ //============================================================================== #pragma once -#include +#include namespace ripple { namespace permissioned_dex { diff --git a/src/xrpld/app/misc/TxQ.h b/src/xrpld/app/misc/TxQ.h index f6ac2c6861..6afd83b0d0 100644 --- a/src/xrpld/app/misc/TxQ.h +++ b/src/xrpld/app/misc/TxQ.h @@ -21,9 +21,9 @@ #define RIPPLE_TXQ_H_INCLUDED #include -#include -#include +#include +#include #include #include #include diff --git a/src/xrpld/app/misc/detail/AMMUtils.cpp b/src/xrpld/app/misc/detail/AMMUtils.cpp index b56ce2748e..94cdb04287 100644 --- a/src/xrpld/app/misc/detail/AMMUtils.cpp +++ b/src/xrpld/app/misc/detail/AMMUtils.cpp @@ -19,9 +19,9 @@ #include #include -#include #include +#include #include #include diff --git a/src/xrpld/app/misc/detail/LoadFeeTrack.cpp b/src/xrpld/app/misc/detail/LoadFeeTrack.cpp index 90c084c44b..4728df9272 100644 --- a/src/xrpld/app/misc/detail/LoadFeeTrack.cpp +++ b/src/xrpld/app/misc/detail/LoadFeeTrack.cpp @@ -18,7 +18,6 @@ //============================================================================== #include -#include #include #include diff --git a/src/xrpld/app/paths/AMMLiquidity.h b/src/xrpld/app/paths/AMMLiquidity.h index ee745b4a8a..cb1db93705 100644 --- a/src/xrpld/app/paths/AMMLiquidity.h +++ b/src/xrpld/app/paths/AMMLiquidity.h @@ -23,10 +23,10 @@ #include #include #include -#include -#include #include +#include +#include #include namespace ripple { diff --git a/src/xrpld/app/paths/AMMOffer.h b/src/xrpld/app/paths/AMMOffer.h index 9241ba2057..3c218c0f5e 100644 --- a/src/xrpld/app/paths/AMMOffer.h +++ b/src/xrpld/app/paths/AMMOffer.h @@ -20,9 +20,8 @@ #ifndef RIPPLE_APP_AMMOFFER_H_INCLUDED #define RIPPLE_APP_AMMOFFER_H_INCLUDED -#include -#include - +#include +#include #include #include diff --git a/src/xrpld/app/paths/Credit.cpp b/src/xrpld/app/paths/Credit.cpp index ca721e4edf..f975385b28 100644 --- a/src/xrpld/app/paths/Credit.cpp +++ b/src/xrpld/app/paths/Credit.cpp @@ -17,8 +17,7 @@ */ //============================================================================== -#include - +#include #include #include #include diff --git a/src/xrpld/app/paths/Credit.h b/src/xrpld/app/paths/Credit.h index 0ea2d687dd..12ea27a734 100644 --- a/src/xrpld/app/paths/Credit.h +++ b/src/xrpld/app/paths/Credit.h @@ -20,8 +20,7 @@ #ifndef RIPPLE_APP_PATHS_CREDIT_H_INCLUDED #define RIPPLE_APP_PATHS_CREDIT_H_INCLUDED -#include - +#include #include #include diff --git a/src/xrpld/app/paths/Pathfinder.cpp b/src/xrpld/app/paths/Pathfinder.cpp index 74a33ec917..41a3697888 100644 --- a/src/xrpld/app/paths/Pathfinder.cpp +++ b/src/xrpld/app/paths/Pathfinder.cpp @@ -24,11 +24,11 @@ #include #include #include -#include #include #include #include +#include #include diff --git a/src/xrpld/app/paths/RippleCalc.cpp b/src/xrpld/app/paths/RippleCalc.cpp index 9c438bdfa9..237f0b8f9c 100644 --- a/src/xrpld/app/paths/RippleCalc.cpp +++ b/src/xrpld/app/paths/RippleCalc.cpp @@ -20,9 +20,9 @@ #include #include #include -#include #include +#include #include namespace ripple { diff --git a/src/xrpld/app/paths/RippleCalc.h b/src/xrpld/app/paths/RippleCalc.h index 09de7334e8..527c26f2ca 100644 --- a/src/xrpld/app/paths/RippleCalc.h +++ b/src/xrpld/app/paths/RippleCalc.h @@ -20,9 +20,8 @@ #ifndef RIPPLE_APP_PATHS_RIPPLECALC_H_INCLUDED #define RIPPLE_APP_PATHS_RIPPLECALC_H_INCLUDED -#include - #include +#include #include #include diff --git a/src/xrpld/app/paths/TrustLine.h b/src/xrpld/app/paths/TrustLine.h index efbe281f5e..5cff89b177 100644 --- a/src/xrpld/app/paths/TrustLine.h +++ b/src/xrpld/app/paths/TrustLine.h @@ -20,9 +20,8 @@ #ifndef RIPPLE_APP_PATHS_RIPPLESTATE_H_INCLUDED #define RIPPLE_APP_PATHS_RIPPLESTATE_H_INCLUDED -#include - #include +#include #include #include #include diff --git a/src/xrpld/app/paths/detail/BookStep.cpp b/src/xrpld/app/paths/detail/BookStep.cpp index 554d2525f5..97cf87c046 100644 --- a/src/xrpld/app/paths/detail/BookStep.cpp +++ b/src/xrpld/app/paths/detail/BookStep.cpp @@ -23,11 +23,11 @@ #include #include #include -#include #include #include #include +#include #include #include #include diff --git a/src/xrpld/app/paths/detail/DirectStep.cpp b/src/xrpld/app/paths/detail/DirectStep.cpp index 5e62a289a3..03d207e008 100644 --- a/src/xrpld/app/paths/detail/DirectStep.cpp +++ b/src/xrpld/app/paths/detail/DirectStep.cpp @@ -20,9 +20,9 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/paths/detail/FlowDebugInfo.h b/src/xrpld/app/paths/detail/FlowDebugInfo.h index e28b34f5d1..eec1d7c5a6 100644 --- a/src/xrpld/app/paths/detail/FlowDebugInfo.h +++ b/src/xrpld/app/paths/detail/FlowDebugInfo.h @@ -21,8 +21,8 @@ #define RIPPLE_PATH_IMPL_FLOWDEBUGINFO_H_INCLUDED #include -#include +#include #include #include diff --git a/src/xrpld/app/paths/detail/PaySteps.cpp b/src/xrpld/app/paths/detail/PaySteps.cpp index aa9e21e182..6eb38eee83 100644 --- a/src/xrpld/app/paths/detail/PaySteps.cpp +++ b/src/xrpld/app/paths/detail/PaySteps.cpp @@ -18,10 +18,10 @@ //============================================================================== #include -#include #include #include +#include #include #include diff --git a/src/xrpld/app/paths/detail/StepChecks.h b/src/xrpld/app/paths/detail/StepChecks.h index 4acafd1b9a..5ca2a463cb 100644 --- a/src/xrpld/app/paths/detail/StepChecks.h +++ b/src/xrpld/app/paths/detail/StepChecks.h @@ -20,11 +20,10 @@ #ifndef RIPPLE_APP_PATHS_IMPL_STEP_CHECKS_H_INCLUDED #define RIPPLE_APP_PATHS_IMPL_STEP_CHECKS_H_INCLUDED -#include -#include - #include #include +#include +#include #include #include diff --git a/src/xrpld/app/paths/detail/XRPEndpointStep.cpp b/src/xrpld/app/paths/detail/XRPEndpointStep.cpp index 7fdfb3749d..9cbcb0c84d 100644 --- a/src/xrpld/app/paths/detail/XRPEndpointStep.cpp +++ b/src/xrpld/app/paths/detail/XRPEndpointStep.cpp @@ -21,9 +21,9 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/apply.h b/src/xrpld/app/tx/apply.h index 101f9a946d..7f43d1a744 100644 --- a/src/xrpld/app/tx/apply.h +++ b/src/xrpld/app/tx/apply.h @@ -22,9 +22,9 @@ #include #include -#include #include +#include #include #include diff --git a/src/xrpld/app/tx/applySteps.h b/src/xrpld/app/tx/applySteps.h index ec7180e263..a543ac37de 100644 --- a/src/xrpld/app/tx/applySteps.h +++ b/src/xrpld/app/tx/applySteps.h @@ -20,9 +20,8 @@ #ifndef RIPPLE_TX_APPLYSTEPS_H_INCLUDED #define RIPPLE_TX_APPLYSTEPS_H_INCLUDED -#include - #include +#include namespace ripple { diff --git a/src/xrpld/app/tx/detail/AMMBid.cpp b/src/xrpld/app/tx/detail/AMMBid.cpp index 86a80431b4..806c075c4f 100644 --- a/src/xrpld/app/tx/detail/AMMBid.cpp +++ b/src/xrpld/app/tx/detail/AMMBid.cpp @@ -20,9 +20,9 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/AMMClawback.cpp b/src/xrpld/app/tx/detail/AMMClawback.cpp index 07c5151727..634b948a64 100644 --- a/src/xrpld/app/tx/detail/AMMClawback.cpp +++ b/src/xrpld/app/tx/detail/AMMClawback.cpp @@ -21,9 +21,9 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/AMMCreate.cpp b/src/xrpld/app/tx/detail/AMMCreate.cpp index f0ccc6f298..03c972f1cd 100644 --- a/src/xrpld/app/tx/detail/AMMCreate.cpp +++ b/src/xrpld/app/tx/detail/AMMCreate.cpp @@ -21,9 +21,9 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/AMMDelete.cpp b/src/xrpld/app/tx/detail/AMMDelete.cpp index 28d56eab98..004e0b2229 100644 --- a/src/xrpld/app/tx/detail/AMMDelete.cpp +++ b/src/xrpld/app/tx/detail/AMMDelete.cpp @@ -19,8 +19,8 @@ #include #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/AMMDeposit.cpp b/src/xrpld/app/tx/detail/AMMDeposit.cpp index 0dafa0da6c..614d788c71 100644 --- a/src/xrpld/app/tx/detail/AMMDeposit.cpp +++ b/src/xrpld/app/tx/detail/AMMDeposit.cpp @@ -20,9 +20,9 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/AMMVote.cpp b/src/xrpld/app/tx/detail/AMMVote.cpp index 84d0905a22..6fbff86056 100644 --- a/src/xrpld/app/tx/detail/AMMVote.cpp +++ b/src/xrpld/app/tx/detail/AMMVote.cpp @@ -19,8 +19,8 @@ #include #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/AMMWithdraw.cpp b/src/xrpld/app/tx/detail/AMMWithdraw.cpp index 2ad1a19df5..9bc36efc81 100644 --- a/src/xrpld/app/tx/detail/AMMWithdraw.cpp +++ b/src/xrpld/app/tx/detail/AMMWithdraw.cpp @@ -20,9 +20,9 @@ #include #include #include -#include #include +#include #include #include diff --git a/src/xrpld/app/tx/detail/AMMWithdraw.h b/src/xrpld/app/tx/detail/AMMWithdraw.h index 1de91fd787..e9a597bdb7 100644 --- a/src/xrpld/app/tx/detail/AMMWithdraw.h +++ b/src/xrpld/app/tx/detail/AMMWithdraw.h @@ -21,7 +21,8 @@ #define RIPPLE_TX_AMMWITHDRAW_H_INCLUDED #include -#include + +#include namespace ripple { diff --git a/src/xrpld/app/tx/detail/ApplyContext.h b/src/xrpld/app/tx/detail/ApplyContext.h index 720d0aeea3..0344771a43 100644 --- a/src/xrpld/app/tx/detail/ApplyContext.h +++ b/src/xrpld/app/tx/detail/ApplyContext.h @@ -22,9 +22,9 @@ #include #include -#include #include +#include #include #include diff --git a/src/xrpld/app/tx/detail/Batch.cpp b/src/xrpld/app/tx/detail/Batch.cpp index 40991ea99a..86d6e8a8f4 100644 --- a/src/xrpld/app/tx/detail/Batch.cpp +++ b/src/xrpld/app/tx/detail/Batch.cpp @@ -19,10 +19,10 @@ #include #include -#include -#include #include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/BookTip.h b/src/xrpld/app/tx/detail/BookTip.h index f215cdb620..0a9c49a4e9 100644 --- a/src/xrpld/app/tx/detail/BookTip.h +++ b/src/xrpld/app/tx/detail/BookTip.h @@ -20,8 +20,7 @@ #ifndef RIPPLE_APP_BOOK_BOOKTIP_H_INCLUDED #define RIPPLE_APP_BOOK_BOOKTIP_H_INCLUDED -#include - +#include #include #include diff --git a/src/xrpld/app/tx/detail/CancelCheck.cpp b/src/xrpld/app/tx/detail/CancelCheck.cpp index cfa3bd10e2..39d0d23096 100644 --- a/src/xrpld/app/tx/detail/CancelCheck.cpp +++ b/src/xrpld/app/tx/detail/CancelCheck.cpp @@ -19,9 +19,9 @@ #include #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/CancelOffer.cpp b/src/xrpld/app/tx/detail/CancelOffer.cpp index 004ae1e8b9..e0a5c7baa7 100644 --- a/src/xrpld/app/tx/detail/CancelOffer.cpp +++ b/src/xrpld/app/tx/detail/CancelOffer.cpp @@ -18,9 +18,9 @@ //============================================================================== #include -#include #include +#include #include namespace ripple { diff --git a/src/xrpld/app/tx/detail/Change.cpp b/src/xrpld/app/tx/detail/Change.cpp index 1392d84c08..de30ed5f62 100644 --- a/src/xrpld/app/tx/detail/Change.cpp +++ b/src/xrpld/app/tx/detail/Change.cpp @@ -22,9 +22,9 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/Clawback.cpp b/src/xrpld/app/tx/detail/Clawback.cpp index 41ab1256fb..08cf4baef0 100644 --- a/src/xrpld/app/tx/detail/Clawback.cpp +++ b/src/xrpld/app/tx/detail/Clawback.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/CreateCheck.cpp b/src/xrpld/app/tx/detail/CreateCheck.cpp index 9baceef944..4dbfd1f81d 100644 --- a/src/xrpld/app/tx/detail/CreateCheck.cpp +++ b/src/xrpld/app/tx/detail/CreateCheck.cpp @@ -18,9 +18,9 @@ //============================================================================== #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/CreateOffer.cpp b/src/xrpld/app/tx/detail/CreateOffer.cpp index 3cfae92cbd..6185e52183 100644 --- a/src/xrpld/app/tx/detail/CreateOffer.cpp +++ b/src/xrpld/app/tx/detail/CreateOffer.cpp @@ -21,10 +21,10 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/Credentials.cpp b/src/xrpld/app/tx/detail/Credentials.cpp index 73c397cf37..b30ae200b7 100644 --- a/src/xrpld/app/tx/detail/Credentials.cpp +++ b/src/xrpld/app/tx/detail/Credentials.cpp @@ -17,12 +17,12 @@ */ //============================================================================== -#include #include -#include -#include #include +#include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/DID.cpp b/src/xrpld/app/tx/detail/DID.cpp index 31ce7c8770..8c4a220844 100644 --- a/src/xrpld/app/tx/detail/DID.cpp +++ b/src/xrpld/app/tx/detail/DID.cpp @@ -18,10 +18,10 @@ //============================================================================== #include -#include -#include #include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/DelegateSet.cpp b/src/xrpld/app/tx/detail/DelegateSet.cpp index ddeb01b399..53052fd75b 100644 --- a/src/xrpld/app/tx/detail/DelegateSet.cpp +++ b/src/xrpld/app/tx/detail/DelegateSet.cpp @@ -18,9 +18,9 @@ //============================================================================== #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/DeleteAccount.cpp b/src/xrpld/app/tx/detail/DeleteAccount.cpp index f9760358e4..02f84adcc3 100644 --- a/src/xrpld/app/tx/detail/DeleteAccount.cpp +++ b/src/xrpld/app/tx/detail/DeleteAccount.cpp @@ -17,7 +17,6 @@ */ //============================================================================== -#include #include #include #include @@ -25,11 +24,12 @@ #include #include #include -#include #include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/DeleteOracle.cpp b/src/xrpld/app/tx/detail/DeleteOracle.cpp index 78e3d55230..ac195d100c 100644 --- a/src/xrpld/app/tx/detail/DeleteOracle.cpp +++ b/src/xrpld/app/tx/detail/DeleteOracle.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/DepositPreauth.cpp b/src/xrpld/app/tx/detail/DepositPreauth.cpp index f10f09b38f..0e8c5c05d2 100644 --- a/src/xrpld/app/tx/detail/DepositPreauth.cpp +++ b/src/xrpld/app/tx/detail/DepositPreauth.cpp @@ -17,11 +17,11 @@ */ //============================================================================== -#include #include -#include #include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/Escrow.cpp b/src/xrpld/app/tx/detail/Escrow.cpp index 7cf76311e0..f1d1db79a0 100644 --- a/src/xrpld/app/tx/detail/Escrow.cpp +++ b/src/xrpld/app/tx/detail/Escrow.cpp @@ -17,17 +17,17 @@ */ //============================================================================== -#include #include #include #include #include #include -#include -#include #include #include +#include +#include +#include #include #include #include @@ -538,6 +538,11 @@ EscrowCreate::doApply() (*slep)[~sfFinishAfter] = ctx_.tx[~sfFinishAfter]; (*slep)[~sfDestinationTag] = ctx_.tx[~sfDestinationTag]; + if (ctx_.view().rules().enabled(fixIncludeKeyletFields)) + { + (*slep)[sfSequence] = ctx_.tx.getSeqValue(); + } + if (ctx_.view().rules().enabled(featureTokenEscrow) && !isXRP(amount)) { auto const xferRate = transferRate(ctx_.view(), amount); diff --git a/src/xrpld/app/tx/detail/InvariantCheck.cpp b/src/xrpld/app/tx/detail/InvariantCheck.cpp index 40062104bb..87ca9ea6c1 100644 --- a/src/xrpld/app/tx/detail/InvariantCheck.cpp +++ b/src/xrpld/app/tx/detail/InvariantCheck.cpp @@ -19,14 +19,14 @@ #include #include -#include #include #include #include -#include -#include #include +#include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/LedgerStateFix.cpp b/src/xrpld/app/tx/detail/LedgerStateFix.cpp index 008d9b6ae7..b861f1d0ef 100644 --- a/src/xrpld/app/tx/detail/LedgerStateFix.cpp +++ b/src/xrpld/app/tx/detail/LedgerStateFix.cpp @@ -19,8 +19,8 @@ #include #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp b/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp index 77fe19a287..1c6d153ec5 100644 --- a/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp +++ b/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp index 6a6e598f42..478ef17bb0 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include +#include #include #include @@ -44,7 +44,7 @@ MPTokenIssuanceCreate::preflight(PreflightContext const& ctx) return ret; if (auto const mutableFlags = ctx.tx[~sfMutableFlags]; mutableFlags && - (!*mutableFlags || *mutableFlags & tfMPTokenIssuanceCreateMutableMask)) + (!*mutableFlags || *mutableFlags & tmfMPTokenIssuanceCreateMutableMask)) return temINVALID_FLAG; if (ctx.tx.getFlags() & tfMPTokenIssuanceCreateMask) diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.cpp b/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.cpp index e2b87dbd79..2c330ba8f7 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.cpp +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceDestroy.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include +#include #include #include diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceSet.cpp b/src/xrpld/app/tx/detail/MPTokenIssuanceSet.cpp index 83b771c705..37c563460a 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceSet.cpp +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceSet.cpp @@ -37,12 +37,14 @@ struct MPTMutabilityFlags }; static constexpr std::array mptMutabilityFlags = { - {{tfMPTSetCanLock, tfMPTClearCanLock, lsfMPTCanMutateCanLock}, - {tfMPTSetRequireAuth, tfMPTClearRequireAuth, lsfMPTCanMutateRequireAuth}, - {tfMPTSetCanEscrow, tfMPTClearCanEscrow, lsfMPTCanMutateCanEscrow}, - {tfMPTSetCanTrade, tfMPTClearCanTrade, lsfMPTCanMutateCanTrade}, - {tfMPTSetCanTransfer, tfMPTClearCanTransfer, lsfMPTCanMutateCanTransfer}, - {tfMPTSetCanClawback, tfMPTClearCanClawback, lsfMPTCanMutateCanClawback}}}; + {{tmfMPTSetCanLock, tmfMPTClearCanLock, lmfMPTCanMutateCanLock}, + {tmfMPTSetRequireAuth, tmfMPTClearRequireAuth, lmfMPTCanMutateRequireAuth}, + {tmfMPTSetCanEscrow, tmfMPTClearCanEscrow, lmfMPTCanMutateCanEscrow}, + {tmfMPTSetCanTrade, tmfMPTClearCanTrade, lmfMPTCanMutateCanTrade}, + {tmfMPTSetCanTransfer, tmfMPTClearCanTransfer, lmfMPTCanMutateCanTransfer}, + {tmfMPTSetCanClawback, + tmfMPTClearCanClawback, + lmfMPTCanMutateCanClawback}}}; NotTEC MPTokenIssuanceSet::preflight(PreflightContext const& ctx) @@ -110,7 +112,7 @@ MPTokenIssuanceSet::preflight(PreflightContext const& ctx) if (mutableFlags) { if (!*mutableFlags || - (*mutableFlags & tfMPTokenIssuanceSetMutableMask)) + (*mutableFlags & tmfMPTokenIssuanceSetMutableMask)) return temINVALID_FLAG; // Can not set and clear the same flag @@ -126,7 +128,7 @@ MPTokenIssuanceSet::preflight(PreflightContext const& ctx) // Trying to set a non-zero TransferFee and clear MPTCanTransfer // in the same transaction is not allowed. if (transferFee.value_or(0) && - (*mutableFlags & tfMPTClearCanTransfer)) + (*mutableFlags & tmfMPTClearCanTransfer)) return temMALFORMED; } } @@ -241,7 +243,7 @@ MPTokenIssuanceSet::preclaim(PreclaimContext const& ctx) return tecNO_PERMISSION; } - if (!isMutableFlag(lsfMPTCanMutateMetadata) && + if (!isMutableFlag(lmfMPTCanMutateMetadata) && ctx.tx.isFieldPresent(sfMPTokenMetadata)) return tecNO_PERMISSION; @@ -249,12 +251,12 @@ MPTokenIssuanceSet::preclaim(PreclaimContext const& ctx) { // A non-zero TransferFee is only valid if the lsfMPTCanTransfer flag // was previously enabled (at issuance or via a prior mutation). Setting - // it by tfMPTSetCanTransfer in the current transaction does not meet + // it by tmfMPTSetCanTransfer in the current transaction does not meet // this requirement. if (fee > 0u && !sleMptIssuance->isFlag(lsfMPTCanTransfer)) return tecNO_PERMISSION; - if (!isMutableFlag(lsfMPTCanMutateTransferFee)) + if (!isMutableFlag(lmfMPTCanMutateTransferFee)) return tecNO_PERMISSION; } @@ -296,7 +298,7 @@ MPTokenIssuanceSet::doApply() flagsOut &= ~f.canMutateFlag; } - if (mutableFlags & tfMPTClearCanTransfer) + if (mutableFlags & tmfMPTClearCanTransfer) { // If the lsfMPTCanTransfer flag is being cleared, then also clear // the TransferFee field. diff --git a/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp b/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp index ab74e5ac39..0cf6a86a37 100644 --- a/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp +++ b/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp @@ -19,8 +19,8 @@ #include #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/NFTokenCancelOffer.cpp b/src/xrpld/app/tx/detail/NFTokenCancelOffer.cpp index f6072bc953..3d0bf04a1b 100644 --- a/src/xrpld/app/tx/detail/NFTokenCancelOffer.cpp +++ b/src/xrpld/app/tx/detail/NFTokenCancelOffer.cpp @@ -19,8 +19,8 @@ #include #include -#include +#include #include #include diff --git a/src/xrpld/app/tx/detail/NFTokenCreateOffer.cpp b/src/xrpld/app/tx/detail/NFTokenCreateOffer.cpp index 8e1a026415..f9cc8c1fc8 100644 --- a/src/xrpld/app/tx/detail/NFTokenCreateOffer.cpp +++ b/src/xrpld/app/tx/detail/NFTokenCreateOffer.cpp @@ -19,8 +19,8 @@ #include #include -#include +#include #include #include diff --git a/src/xrpld/app/tx/detail/NFTokenMint.cpp b/src/xrpld/app/tx/detail/NFTokenMint.cpp index 42b551b3a4..4c07a6e499 100644 --- a/src/xrpld/app/tx/detail/NFTokenMint.cpp +++ b/src/xrpld/app/tx/detail/NFTokenMint.cpp @@ -18,9 +18,9 @@ //============================================================================== #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/NFTokenUtils.cpp b/src/xrpld/app/tx/detail/NFTokenUtils.cpp index 4866a3b385..ad3e6f4d35 100644 --- a/src/xrpld/app/tx/detail/NFTokenUtils.cpp +++ b/src/xrpld/app/tx/detail/NFTokenUtils.cpp @@ -18,10 +18,10 @@ //============================================================================== #include -#include -#include #include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/NFTokenUtils.h b/src/xrpld/app/tx/detail/NFTokenUtils.h index 7ee0541984..6d33d4ec1a 100644 --- a/src/xrpld/app/tx/detail/NFTokenUtils.h +++ b/src/xrpld/app/tx/detail/NFTokenUtils.h @@ -21,9 +21,9 @@ #define RIPPLE_TX_IMPL_DETAILS_NFTOKENUTILS_H_INCLUDED #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/Offer.h b/src/xrpld/app/tx/detail/Offer.h index d6ff4c7699..c214bea23f 100644 --- a/src/xrpld/app/tx/detail/Offer.h +++ b/src/xrpld/app/tx/detail/Offer.h @@ -20,10 +20,9 @@ #ifndef RIPPLE_APP_BOOK_OFFER_H_INCLUDED #define RIPPLE_APP_BOOK_OFFER_H_INCLUDED -#include - #include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/OfferStream.cpp b/src/xrpld/app/tx/detail/OfferStream.cpp index 55993f5c5f..8e1215f5c8 100644 --- a/src/xrpld/app/tx/detail/OfferStream.cpp +++ b/src/xrpld/app/tx/detail/OfferStream.cpp @@ -19,9 +19,9 @@ #include #include -#include #include +#include #include #include diff --git a/src/xrpld/app/tx/detail/OfferStream.h b/src/xrpld/app/tx/detail/OfferStream.h index cf6c1c3d2d..6470f876a6 100644 --- a/src/xrpld/app/tx/detail/OfferStream.h +++ b/src/xrpld/app/tx/detail/OfferStream.h @@ -22,11 +22,11 @@ #include #include -#include #include #include #include +#include #include diff --git a/src/xrpld/app/tx/detail/PayChan.cpp b/src/xrpld/app/tx/detail/PayChan.cpp index d9e53ac75c..bdfe0d5c95 100644 --- a/src/xrpld/app/tx/detail/PayChan.cpp +++ b/src/xrpld/app/tx/detail/PayChan.cpp @@ -17,13 +17,13 @@ */ //============================================================================== -#include #include -#include -#include #include #include +#include +#include +#include #include #include #include @@ -286,6 +286,10 @@ PayChanCreate::doApply() (*slep)[~sfCancelAfter] = ctx_.tx[~sfCancelAfter]; (*slep)[~sfSourceTag] = ctx_.tx[~sfSourceTag]; (*slep)[~sfDestinationTag] = ctx_.tx[~sfDestinationTag]; + if (ctx_.view().rules().enabled(fixIncludeKeyletFields)) + { + (*slep)[sfSequence] = ctx_.tx.getSeqValue(); + } ctx_.view().insert(slep); diff --git a/src/xrpld/app/tx/detail/Payment.cpp b/src/xrpld/app/tx/detail/Payment.cpp index 784330b203..e622d54498 100644 --- a/src/xrpld/app/tx/detail/Payment.cpp +++ b/src/xrpld/app/tx/detail/Payment.cpp @@ -17,14 +17,14 @@ */ //============================================================================== -#include #include #include #include #include -#include #include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp b/src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp index 64c498b68b..76224ba6b3 100644 --- a/src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp +++ b/src/xrpld/app/tx/detail/PermissionedDomainDelete.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include +#include #include namespace ripple { diff --git a/src/xrpld/app/tx/detail/PermissionedDomainSet.cpp b/src/xrpld/app/tx/detail/PermissionedDomainSet.cpp index 6e2df2a082..cc25809aa1 100644 --- a/src/xrpld/app/tx/detail/PermissionedDomainSet.cpp +++ b/src/xrpld/app/tx/detail/PermissionedDomainSet.cpp @@ -17,10 +17,10 @@ */ //============================================================================== -#include #include -#include +#include +#include #include #include diff --git a/src/xrpld/app/tx/detail/SetAccount.cpp b/src/xrpld/app/tx/detail/SetAccount.cpp index ec618981c1..dc84c7cc7e 100644 --- a/src/xrpld/app/tx/detail/SetAccount.cpp +++ b/src/xrpld/app/tx/detail/SetAccount.cpp @@ -20,9 +20,9 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/SetOracle.cpp b/src/xrpld/app/tx/detail/SetOracle.cpp index d598507cb7..78ff8e2953 100644 --- a/src/xrpld/app/tx/detail/SetOracle.cpp +++ b/src/xrpld/app/tx/detail/SetOracle.cpp @@ -18,9 +18,9 @@ //============================================================================== #include -#include -#include +#include +#include #include #include #include @@ -271,6 +271,11 @@ SetOracle::doApply() if (ctx_.tx.isFieldPresent(sfURI)) sle->setFieldVL(sfURI, ctx_.tx[sfURI]); sle->setFieldU32(sfLastUpdateTime, ctx_.tx[sfLastUpdateTime]); + if (!sle->isFieldPresent(sfOracleDocumentID) && + ctx_.view().rules().enabled(fixIncludeKeyletFields)) + { + (*sle)[sfOracleDocumentID] = ctx_.tx[sfOracleDocumentID]; + } auto const newCount = pairs.size() > 5 ? 2 : 1; auto const adjust = newCount - oldCount; @@ -285,6 +290,10 @@ SetOracle::doApply() sle = std::make_shared(oracleID); sle->setAccountID(sfOwner, ctx_.tx.getAccountID(sfAccount)); + if (ctx_.view().rules().enabled(fixIncludeKeyletFields)) + { + (*sle)[sfOracleDocumentID] = ctx_.tx[sfOracleDocumentID]; + } sle->setFieldVL(sfProvider, ctx_.tx[sfProvider]); if (ctx_.tx.isFieldPresent(sfURI)) sle->setFieldVL(sfURI, ctx_.tx[sfURI]); diff --git a/src/xrpld/app/tx/detail/SetSignerList.cpp b/src/xrpld/app/tx/detail/SetSignerList.cpp index 4a1ee703a0..60f92cf87b 100644 --- a/src/xrpld/app/tx/detail/SetSignerList.cpp +++ b/src/xrpld/app/tx/detail/SetSignerList.cpp @@ -19,9 +19,9 @@ #include #include -#include #include +#include #include #include #include @@ -37,7 +37,7 @@ namespace ripple { // We're prepared for there to be multiple signer lists in the future, // but we don't need them yet. So for the time being we're manually // setting the sfSignerListID to zero in all cases. -static std::uint32_t const defaultSignerListID_ = 0; +static std::uint32_t const DEFAULT_SIGNER_LIST_ID = 0; std::tuple< NotTEC, @@ -424,8 +424,12 @@ SetSignerList::writeSignersToSLE( std::uint32_t flags) const { // Assign the quorum, default SignerListID, and flags. + if (ctx_.view().rules().enabled(fixIncludeKeyletFields)) + { + ledgerEntry->setAccountID(sfOwner, account_); + } ledgerEntry->setFieldU32(sfSignerQuorum, quorum_); - ledgerEntry->setFieldU32(sfSignerListID, defaultSignerListID_); + ledgerEntry->setFieldU32(sfSignerListID, DEFAULT_SIGNER_LIST_ID); if (flags) // Only set flags if they are non-default (default is zero). ledgerEntry->setFieldU32(sfFlags, flags); diff --git a/src/xrpld/app/tx/detail/SetTrust.cpp b/src/xrpld/app/tx/detail/SetTrust.cpp index d3b39aaf11..87f1721b29 100644 --- a/src/xrpld/app/tx/detail/SetTrust.cpp +++ b/src/xrpld/app/tx/detail/SetTrust.cpp @@ -19,9 +19,9 @@ #include #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/Taker.h b/src/xrpld/app/tx/detail/Taker.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/xrpld/app/tx/detail/Transactor.cpp b/src/xrpld/app/tx/detail/Transactor.cpp index c09fc4132b..fd396e4556 100644 --- a/src/xrpld/app/tx/detail/Transactor.cpp +++ b/src/xrpld/app/tx/detail/Transactor.cpp @@ -18,7 +18,6 @@ //============================================================================== #include -#include #include #include #include @@ -26,11 +25,12 @@ #include #include #include -#include #include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/VaultClawback.cpp b/src/xrpld/app/tx/detail/VaultClawback.cpp index 87740da179..061aacdbb8 100644 --- a/src/xrpld/app/tx/detail/VaultClawback.cpp +++ b/src/xrpld/app/tx/detail/VaultClawback.cpp @@ -18,9 +18,9 @@ //============================================================================== #include -#include #include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/VaultCreate.cpp b/src/xrpld/app/tx/detail/VaultCreate.cpp index 0b5cdd4fc0..855275bf4e 100644 --- a/src/xrpld/app/tx/detail/VaultCreate.cpp +++ b/src/xrpld/app/tx/detail/VaultCreate.cpp @@ -20,8 +20,8 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/VaultDelete.cpp b/src/xrpld/app/tx/detail/VaultDelete.cpp index d4b74ae1d5..5e4e16a99b 100644 --- a/src/xrpld/app/tx/detail/VaultDelete.cpp +++ b/src/xrpld/app/tx/detail/VaultDelete.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/VaultDeposit.cpp b/src/xrpld/app/tx/detail/VaultDeposit.cpp index 5cdcb43e20..3d346d63a2 100644 --- a/src/xrpld/app/tx/detail/VaultDeposit.cpp +++ b/src/xrpld/app/tx/detail/VaultDeposit.cpp @@ -17,11 +17,11 @@ */ //============================================================================== -#include #include #include -#include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/VaultSet.cpp b/src/xrpld/app/tx/detail/VaultSet.cpp index 4750f89be2..5a519f81cf 100644 --- a/src/xrpld/app/tx/detail/VaultSet.cpp +++ b/src/xrpld/app/tx/detail/VaultSet.cpp @@ -18,8 +18,8 @@ //============================================================================== #include -#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/VaultWithdraw.cpp b/src/xrpld/app/tx/detail/VaultWithdraw.cpp index 0ceaabbfde..63cc22fe48 100644 --- a/src/xrpld/app/tx/detail/VaultWithdraw.cpp +++ b/src/xrpld/app/tx/detail/VaultWithdraw.cpp @@ -17,10 +17,10 @@ */ //============================================================================== -#include #include -#include +#include +#include #include #include #include diff --git a/src/xrpld/app/tx/detail/XChainBridge.cpp b/src/xrpld/app/tx/detail/XChainBridge.cpp index 6ca049ee66..92e3c7f625 100644 --- a/src/xrpld/app/tx/detail/XChainBridge.cpp +++ b/src/xrpld/app/tx/detail/XChainBridge.cpp @@ -21,15 +21,15 @@ #include #include #include -#include -#include -#include #include #include #include #include #include +#include +#include +#include #include #include #include diff --git a/src/xrpld/rpc/detail/RPCHelpers.cpp b/src/xrpld/rpc/detail/RPCHelpers.cpp index 391d642438..edb91611be 100644 --- a/src/xrpld/rpc/detail/RPCHelpers.cpp +++ b/src/xrpld/rpc/detail/RPCHelpers.cpp @@ -24,11 +24,11 @@ #include #include #include -#include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/AMMInfo.cpp b/src/xrpld/rpc/handlers/AMMInfo.cpp index b312264f90..7c1dd3ba58 100644 --- a/src/xrpld/rpc/handlers/AMMInfo.cpp +++ b/src/xrpld/rpc/handlers/AMMInfo.cpp @@ -19,11 +19,11 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/src/xrpld/rpc/handlers/AccountChannels.cpp b/src/xrpld/rpc/handlers/AccountChannels.cpp index 5d810d61a0..1b0046ab64 100644 --- a/src/xrpld/rpc/handlers/AccountChannels.cpp +++ b/src/xrpld/rpc/handlers/AccountChannels.cpp @@ -17,12 +17,12 @@ */ //============================================================================== -#include -#include #include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp b/src/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp index 2d08561ec9..59a13f5893 100644 --- a/src/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp +++ b/src/xrpld/rpc/handlers/AccountCurrenciesHandler.cpp @@ -18,10 +18,10 @@ //============================================================================== #include -#include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/AccountInfo.cpp b/src/xrpld/rpc/handlers/AccountInfo.cpp index 3432021690..0a36993d65 100644 --- a/src/xrpld/rpc/handlers/AccountInfo.cpp +++ b/src/xrpld/rpc/handlers/AccountInfo.cpp @@ -19,12 +19,12 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/AccountLines.cpp b/src/xrpld/rpc/handlers/AccountLines.cpp index e921eee386..893ca9a190 100644 --- a/src/xrpld/rpc/handlers/AccountLines.cpp +++ b/src/xrpld/rpc/handlers/AccountLines.cpp @@ -18,11 +18,11 @@ //============================================================================== #include -#include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/AccountObjects.cpp b/src/xrpld/rpc/handlers/AccountObjects.cpp index 2b2496a1dd..acd99c205e 100644 --- a/src/xrpld/rpc/handlers/AccountObjects.cpp +++ b/src/xrpld/rpc/handlers/AccountObjects.cpp @@ -18,11 +18,11 @@ //============================================================================== #include -#include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/AccountOffers.cpp b/src/xrpld/rpc/handlers/AccountOffers.cpp index bc575d2d86..e65b39b35b 100644 --- a/src/xrpld/rpc/handlers/AccountOffers.cpp +++ b/src/xrpld/rpc/handlers/AccountOffers.cpp @@ -17,13 +17,13 @@ */ //============================================================================== -#include -#include #include #include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/AccountTx.cpp b/src/xrpld/rpc/handlers/AccountTx.cpp index d5df40303b..6b1dccdba9 100644 --- a/src/xrpld/rpc/handlers/AccountTx.cpp +++ b/src/xrpld/rpc/handlers/AccountTx.cpp @@ -22,13 +22,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/BookOffers.cpp b/src/xrpld/rpc/handlers/BookOffers.cpp index df4712209c..6506474163 100644 --- a/src/xrpld/rpc/handlers/BookOffers.cpp +++ b/src/xrpld/rpc/handlers/BookOffers.cpp @@ -19,12 +19,12 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/DepositAuthorized.cpp b/src/xrpld/rpc/handlers/DepositAuthorized.cpp index 1bb480544d..c184a7f845 100644 --- a/src/xrpld/rpc/handlers/DepositAuthorized.cpp +++ b/src/xrpld/rpc/handlers/DepositAuthorized.cpp @@ -17,11 +17,11 @@ */ //============================================================================== -#include -#include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/GatewayBalances.cpp b/src/xrpld/rpc/handlers/GatewayBalances.cpp index ca9e370c81..a4542f682f 100644 --- a/src/xrpld/rpc/handlers/GatewayBalances.cpp +++ b/src/xrpld/rpc/handlers/GatewayBalances.cpp @@ -19,10 +19,10 @@ #include #include -#include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/GetAggregatePrice.cpp b/src/xrpld/rpc/handlers/GetAggregatePrice.cpp index 33a88ba78f..2227143d70 100644 --- a/src/xrpld/rpc/handlers/GetAggregatePrice.cpp +++ b/src/xrpld/rpc/handlers/GetAggregatePrice.cpp @@ -19,11 +19,11 @@ #include #include -#include #include #include #include +#include #include #include diff --git a/src/xrpld/rpc/handlers/LedgerData.cpp b/src/xrpld/rpc/handlers/LedgerData.cpp index 7bd50cc1e5..e6c579a4b5 100644 --- a/src/xrpld/rpc/handlers/LedgerData.cpp +++ b/src/xrpld/rpc/handlers/LedgerData.cpp @@ -18,13 +18,13 @@ //============================================================================== #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/LedgerEntry.cpp b/src/xrpld/rpc/handlers/LedgerEntry.cpp index 61a7e2fb2c..cead16c04d 100644 --- a/src/xrpld/rpc/handlers/LedgerEntry.cpp +++ b/src/xrpld/rpc/handlers/LedgerEntry.cpp @@ -17,8 +17,6 @@ */ //============================================================================== -#include -#include #include #include #include @@ -28,6 +26,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/LedgerHandler.h b/src/xrpld/rpc/handlers/LedgerHandler.h index a573589cbc..4cbf984505 100644 --- a/src/xrpld/rpc/handlers/LedgerHandler.h +++ b/src/xrpld/rpc/handlers/LedgerHandler.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -31,6 +30,7 @@ #include #include +#include #include namespace Json { diff --git a/src/xrpld/rpc/handlers/LedgerHeader.cpp b/src/xrpld/rpc/handlers/LedgerHeader.cpp index 1815c8db56..a407dc4318 100644 --- a/src/xrpld/rpc/handlers/LedgerHeader.cpp +++ b/src/xrpld/rpc/handlers/LedgerHeader.cpp @@ -18,10 +18,10 @@ //============================================================================== #include -#include #include #include +#include #include namespace ripple { diff --git a/src/xrpld/rpc/handlers/NFTOffers.cpp b/src/xrpld/rpc/handlers/NFTOffers.cpp index 52a5c69ab0..598abd2c3f 100644 --- a/src/xrpld/rpc/handlers/NFTOffers.cpp +++ b/src/xrpld/rpc/handlers/NFTOffers.cpp @@ -17,13 +17,13 @@ */ //============================================================================== -#include -#include #include #include #include #include +#include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/NoRippleCheck.cpp b/src/xrpld/rpc/handlers/NoRippleCheck.cpp index a6007e9eab..abe51aa206 100644 --- a/src/xrpld/rpc/handlers/NoRippleCheck.cpp +++ b/src/xrpld/rpc/handlers/NoRippleCheck.cpp @@ -20,11 +20,11 @@ #include #include #include -#include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/PayChanClaim.cpp b/src/xrpld/rpc/handlers/PayChanClaim.cpp index b62f5e54e5..6945d2a051 100644 --- a/src/xrpld/rpc/handlers/PayChanClaim.cpp +++ b/src/xrpld/rpc/handlers/PayChanClaim.cpp @@ -18,11 +18,11 @@ //============================================================================== #include -#include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/Subscribe.cpp b/src/xrpld/rpc/handlers/Subscribe.cpp index 1696754e9c..be08769875 100644 --- a/src/xrpld/rpc/handlers/Subscribe.cpp +++ b/src/xrpld/rpc/handlers/Subscribe.cpp @@ -20,13 +20,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include diff --git a/src/xrpld/rpc/handlers/TransactionEntry.cpp b/src/xrpld/rpc/handlers/TransactionEntry.cpp index c94e95063b..02ff329354 100644 --- a/src/xrpld/rpc/handlers/TransactionEntry.cpp +++ b/src/xrpld/rpc/handlers/TransactionEntry.cpp @@ -19,10 +19,10 @@ #include #include -#include #include #include +#include #include namespace ripple {