mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 11:15:56 +00:00
Merge branch 'develop' into ximinez/lending-XLS-66
This commit is contained in:
@@ -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 "")
|
||||
|
||||
@@ -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
|
||||
|
||||
12
conanfile.py
12
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',
|
||||
|
||||
2
external/antithesis-sdk/CMakeLists.txt
vendored
2
external/antithesis-sdk/CMakeLists.txt
vendored
@@ -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)
|
||||
|
||||
@@ -22,8 +22,18 @@
|
||||
|
||||
#include <xrpl/basics/contract.h>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#include <boost/outcome.hpp>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -24,13 +24,38 @@
|
||||
#include <boost/container/flat_set.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
|
||||
/*
|
||||
|
||||
Workaround for overzealous clang warning, which trips on libstdc++ headers
|
||||
|
||||
In file included from
|
||||
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_algo.h:61:
|
||||
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/stl_tempbuf.h:263:8:
|
||||
error: 'get_temporary_buffer<std::pair<ripple::Quality, const
|
||||
std::vector<std::unique_ptr<ripple::Step>> *>>' is deprecated
|
||||
[-Werror,-Wdeprecated-declarations] 263 |
|
||||
std::get_temporary_buffer<value_type>(_M_original_len));
|
||||
^
|
||||
*/
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
|
||||
@@ -17,18 +17,8 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <test/jtx/AMM.h>
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/AMMTest.h>
|
||||
#include <test/jtx/Account.h>
|
||||
#include <test/jtx/Env.h>
|
||||
#include <test/jtx/amount.h>
|
||||
#include <test/jtx/credentials.h>
|
||||
#include <test/jtx/fee.h>
|
||||
#include <test/jtx/flags.h>
|
||||
#include <test/jtx/mpt.h>
|
||||
#include <test/jtx/permissioned_domains.h>
|
||||
#include <test/jtx/utility.h>
|
||||
#include <test/jtx/vault.h>
|
||||
|
||||
#include <xrpld/ledger/View.h>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
// Convenience header that includes everything
|
||||
|
||||
#include <test/jtx/AMM.h>
|
||||
#include <test/jtx/Account.h>
|
||||
#include <test/jtx/Env.h>
|
||||
#include <test/jtx/Env_ss.h>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <test/jtx/mpt.h>
|
||||
#include <test/jtx.h>
|
||||
|
||||
#include <xrpl/protocol/jss.h>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <test/jtx/permissioned_dex.h>
|
||||
#include <test/jtx.h>
|
||||
|
||||
#include <xrpl/beast/unit_test/suite.h>
|
||||
#include <xrpl/protocol/jss.h>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <test/jtx/permissioned_domains.h>
|
||||
#include <test/jtx.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace test {
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
#ifndef RIPPLE_TEST_JTX_MPT_H_INCLUDED
|
||||
#define RIPPLE_TEST_JTX_MPT_H_INCLUDED
|
||||
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/Account.h>
|
||||
#include <test/jtx/Env.h>
|
||||
#include <test/jtx/ter.h>
|
||||
#include <test/jtx/txflags.h>
|
||||
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/Account.h>
|
||||
#include <test/jtx/Env.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace test {
|
||||
namespace jtx {
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
#ifndef RIPPLE_TEST_JTX_PERMISSIONED_DOMAINS_H_INCLUDED
|
||||
#define RIPPLE_TEST_JTX_PERMISSIONED_DOMAINS_H_INCLUDED
|
||||
|
||||
#include <test/jtx.h>
|
||||
#include <test/jtx/Account.h>
|
||||
#include <test/jtx/Env.h>
|
||||
#include <test/jtx/deposit.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -675,6 +675,30 @@ public:
|
||||
BEAST_EXPECT(
|
||||
!getAccountFlag(allowTrustLineClawbackFlag.first, bob));
|
||||
}
|
||||
|
||||
static constexpr std::pair<std::string_view, std::uint32_t>
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -108,6 +108,10 @@ doAccountInfo(RPC::JsonContext& context)
|
||||
allowTrustLineClawbackFlag{
|
||||
"allowTrustLineClawback", lsfAllowTrustLineClawback};
|
||||
|
||||
static constexpr std::pair<std::string_view, LedgerSpecificFlags>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user