diff --git a/cmake/RippledSettings.cmake b/cmake/RippledSettings.cmake index b2d7b0d9a5..9dc8609f58 100644 --- a/cmake/RippledSettings.cmake +++ b/cmake/RippledSettings.cmake @@ -18,7 +18,7 @@ if(tests) endif() endif() -option(unity "Creates a build using UNITY support in cmake. This is the default" ON) +option(unity "Creates a build using UNITY support in cmake." OFF) if(unity) if(NOT is_ci) set(CMAKE_UNITY_BUILD_BATCH_SIZE 15 CACHE STRING "") diff --git a/cmake/deps/Boost.cmake b/cmake/deps/Boost.cmake index 041c2380e1..031202f4d2 100644 --- a/cmake/deps/Boost.cmake +++ b/cmake/deps/Boost.cmake @@ -2,7 +2,6 @@ find_package(Boost 1.82 REQUIRED COMPONENTS chrono container - context coroutine date_time filesystem @@ -24,7 +23,7 @@ endif() target_link_libraries(ripple_boost INTERFACE - Boost::boost + Boost::headers Boost::chrono Boost::container Boost::coroutine diff --git a/conanfile.py b/conanfile.py index 1a9e88fc0d..2df08544cd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -164,7 +164,17 @@ class Xrpl(ConanFile): # `include/`, not `include/ripple/proto/`. libxrpl.includedirs = ['include', 'include/ripple/proto'] libxrpl.requires = [ - 'boost::boost', + 'boost::headers', + 'boost::chrono', + 'boost::container', + 'boost::coroutine', + 'boost::date_time', + 'boost::filesystem', + 'boost::json', + 'boost::program_options', + 'boost::regex', + 'boost::system', + 'boost::thread', 'date::date', 'grpc::grpc++', 'libarchive::libarchive', diff --git a/external/antithesis-sdk/CMakeLists.txt b/external/antithesis-sdk/CMakeLists.txt index d2c1f536af..46c7b4bf7a 100644 --- a/external/antithesis-sdk/CMakeLists.txt +++ b/external/antithesis-sdk/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.25) +cmake_minimum_required(VERSION 3.18) # Note, version set explicitly by rippled project project(antithesis-sdk-cpp VERSION 0.4.4 LANGUAGES CXX) diff --git a/include/xrpl/basics/Expected.h b/include/xrpl/basics/Expected.h index 9afb160d9d..d2440f63ab 100644 --- a/include/xrpl/basics/Expected.h +++ b/include/xrpl/basics/Expected.h @@ -22,8 +22,18 @@ #include +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + #include +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + #include namespace ripple { diff --git a/include/xrpl/beast/hash/hash_append.h b/include/xrpl/beast/hash/hash_append.h index 6b11fe1eb3..825555320a 100644 --- a/include/xrpl/beast/hash/hash_append.h +++ b/include/xrpl/beast/hash/hash_append.h @@ -24,13 +24,38 @@ #include #include +/* + +Workaround for overzealous clang warning, which trips on libstdc++ headers + + In file included from + /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:61: + /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8: + error: 'get_temporary_buffer> *>>' is deprecated + [-Werror,-Wdeprecated-declarations] 263 | + std::get_temporary_buffer(_M_original_len)); + ^ +*/ + +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated" +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + +#include +#include + +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + #include #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 ccac0e2819..25e486f1a2 100644 --- a/src/test/app/Vault_test.cpp +++ b/src/test/app/Vault_test.cpp @@ -17,18 +17,8 @@ */ //============================================================================== -#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include diff --git a/src/test/basics/Buffer_test.cpp b/src/test/basics/Buffer_test.cpp index 43ca048d7f..c59805f569 100644 --- a/src/test/basics/Buffer_test.cpp +++ b/src/test/basics/Buffer_test.cpp @@ -98,8 +98,7 @@ struct Buffer_test : beast::unit_test::suite x = b0; BEAST_EXPECT(x == b0); BEAST_EXPECT(sane(x)); -#if defined(__clang__) && (!defined(__APPLE__) && (__clang_major__ >= 7)) || \ - (defined(__APPLE__) && (__apple_build_version__ >= 10010043)) +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wself-assign-overloaded" #endif @@ -111,8 +110,7 @@ struct Buffer_test : beast::unit_test::suite BEAST_EXPECT(y == b3); BEAST_EXPECT(sane(y)); -#if defined(__clang__) && (!defined(__APPLE__) && (__clang_major__ >= 7)) || \ - (defined(__APPLE__) && (__apple_build_version__ >= 10010043)) +#if defined(__clang__) #pragma clang diagnostic pop #endif } diff --git a/src/test/jtx.h b/src/test/jtx.h index 4188910085..6347b9dcf9 100644 --- a/src/test/jtx.h +++ b/src/test/jtx.h @@ -22,6 +22,7 @@ // Convenience header that includes everything +#include #include #include #include diff --git a/src/test/jtx/impl/mpt.cpp b/src/test/jtx/impl/mpt.cpp index c8ff167221..d33432d316 100644 --- a/src/test/jtx/impl/mpt.cpp +++ b/src/test/jtx/impl/mpt.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include #include diff --git a/src/test/jtx/impl/permissioned_dex.cpp b/src/test/jtx/impl/permissioned_dex.cpp index 04497ebbdc..4b09a11880 100644 --- a/src/test/jtx/impl/permissioned_dex.cpp +++ b/src/test/jtx/impl/permissioned_dex.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include #include #include diff --git a/src/test/jtx/impl/permissioned_domains.cpp b/src/test/jtx/impl/permissioned_domains.cpp index 866ca3bb7e..441ee325c8 100644 --- a/src/test/jtx/impl/permissioned_domains.cpp +++ b/src/test/jtx/impl/permissioned_domains.cpp @@ -17,7 +17,7 @@ */ //============================================================================== -#include +#include namespace ripple { namespace test { diff --git a/src/test/jtx/mpt.h b/src/test/jtx/mpt.h index 52ade92323..64eaa452f5 100644 --- a/src/test/jtx/mpt.h +++ b/src/test/jtx/mpt.h @@ -20,7 +20,8 @@ #ifndef RIPPLE_TEST_JTX_MPT_H_INCLUDED #define RIPPLE_TEST_JTX_MPT_H_INCLUDED -#include +#include +#include #include #include diff --git a/src/test/jtx/permissioned_dex.h b/src/test/jtx/permissioned_dex.h index fb32e1c1be..b95574d94d 100644 --- a/src/test/jtx/permissioned_dex.h +++ b/src/test/jtx/permissioned_dex.h @@ -19,7 +19,9 @@ #pragma once -#include +#include +#include + namespace ripple { namespace test { namespace jtx { diff --git a/src/test/jtx/permissioned_domains.h b/src/test/jtx/permissioned_domains.h index ee80c6a69f..ed086e366d 100644 --- a/src/test/jtx/permissioned_domains.h +++ b/src/test/jtx/permissioned_domains.h @@ -20,7 +20,8 @@ #ifndef RIPPLE_TEST_JTX_PERMISSIONED_DOMAINS_H_INCLUDED #define RIPPLE_TEST_JTX_PERMISSIONED_DOMAINS_H_INCLUDED -#include +#include +#include #include namespace ripple { diff --git a/src/test/rpc/AccountInfo_test.cpp b/src/test/rpc/AccountInfo_test.cpp index 238b739611..0b41da2ded 100644 --- a/src/test/rpc/AccountInfo_test.cpp +++ b/src/test/rpc/AccountInfo_test.cpp @@ -675,6 +675,30 @@ public: BEAST_EXPECT( !getAccountFlag(allowTrustLineClawbackFlag.first, bob)); } + + static constexpr std::pair + allowTrustLineLockingFlag{ + "allowTrustLineLocking", asfAllowTrustLineLocking}; + + if (features[featureTokenEscrow]) + { + auto const f1 = + getAccountFlag(allowTrustLineLockingFlag.first, bob); + BEAST_EXPECT(f1.has_value()); + BEAST_EXPECT(!f1.value()); + + // Set allowTrustLineLocking + env(fset(bob, allowTrustLineLockingFlag.second)); + env.close(); + auto const f2 = + getAccountFlag(allowTrustLineLockingFlag.first, bob); + BEAST_EXPECT(f2.has_value()); + BEAST_EXPECT(f2.value()); + } + else + { + BEAST_EXPECT(!getAccountFlag(allowTrustLineLockingFlag.first, bob)); + } } void @@ -691,6 +715,9 @@ public: testAccountFlags(allFeatures - featureDisallowIncoming); testAccountFlags( allFeatures - featureDisallowIncoming - featureClawback); + testAccountFlags( + allFeatures - featureDisallowIncoming - featureClawback - + featureTokenEscrow); } }; diff --git a/src/xrpld/rpc/handlers/AccountInfo.cpp b/src/xrpld/rpc/handlers/AccountInfo.cpp index 6416309e2e..3432021690 100644 --- a/src/xrpld/rpc/handlers/AccountInfo.cpp +++ b/src/xrpld/rpc/handlers/AccountInfo.cpp @@ -108,6 +108,10 @@ doAccountInfo(RPC::JsonContext& context) allowTrustLineClawbackFlag{ "allowTrustLineClawback", lsfAllowTrustLineClawback}; + static constexpr std::pair + allowTrustLineLockingFlag{ + "allowTrustLineLocking", lsfAllowTrustLineLocking}; + auto const sleAccepted = ledger->read(keylet::account(accountID)); if (sleAccepted) { @@ -140,6 +144,10 @@ doAccountInfo(RPC::JsonContext& context) acctFlags[allowTrustLineClawbackFlag.first.data()] = sleAccepted->isFlag(allowTrustLineClawbackFlag.second); + if (ledger->rules().enabled(featureTokenEscrow)) + acctFlags[allowTrustLineLockingFlag.first.data()] = + sleAccepted->isFlag(allowTrustLineLockingFlag.second); + result[jss::account_flags] = std::move(acctFlags); // The document[https://xrpl.org/account_info.html#account_info] states