mirror of
https://github.com/XRPLF/clio.git
synced 2026-09-28 07:58:10 +00:00
Fix merge conflicts
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include <boost/json/conversion.hpp>
|
||||
#include <boost/json/object.hpp>
|
||||
#include <boost/json/value.hpp>
|
||||
#include <rpcspec/detail/TxTypes.hpp>
|
||||
#include <rpcspec/TxTypes.hpp>
|
||||
#include <xrpl/protocol/ErrorCodes.h>
|
||||
#include <xrpl/protocol/TxFormats.h>
|
||||
#include <xrpl/protocol/jss.h>
|
||||
@@ -114,9 +114,9 @@ public:
|
||||
static RpcSpecConstRef
|
||||
spec([[maybe_unused]] uint32_t apiVersion)
|
||||
{
|
||||
// TODO: reaches into rpcspec's detail namespace; goes away when account_tx moves
|
||||
// to the shared spec, where the tx_type validator calls this internally.
|
||||
auto const& typesKeysInLowercase = spec::detail::txTypesInLowercase();
|
||||
// TODO: goes away when account_tx moves to the shared spec, where the tx_type
|
||||
// validator calls this internally.
|
||||
auto const& typesKeysInLowercase = spec::txTypesInLowercase();
|
||||
static auto const kRpcSpecForV1 = RpcSpec{
|
||||
{JS(account), validation::Required{}, validation::CustomValidators::accountValidator},
|
||||
{JS(ledger_hash), validation::CustomValidators::uint256HexStringValidator},
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
#include "rpc/common/Specs.hpp"
|
||||
#include "rpc/common/Types.hpp"
|
||||
#include "rpc/common/Validators.hpp"
|
||||
#include "util/TxUtils.hpp"
|
||||
#include "util/log/Logger.hpp"
|
||||
|
||||
#include <boost/json/array.hpp>
|
||||
#include <boost/json/conversion.hpp>
|
||||
#include <boost/json/object.hpp>
|
||||
#include <boost/json/value.hpp>
|
||||
#include <rpcspec/TxTypes.hpp>
|
||||
#include <xrpl/basics/base_uint.h>
|
||||
#include <xrpl/protocol/ErrorCodes.h>
|
||||
#include <xrpl/protocol/jss.h>
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
static RpcSpecConstRef
|
||||
spec([[maybe_unused]] uint32_t apiVersion)
|
||||
{
|
||||
auto const& typesKeysInLowercase = util::getTxTypesInLowercase();
|
||||
auto const& typesKeysInLowercase = spec::txTypesInLowercase();
|
||||
static auto const kRpcSpec = RpcSpec{
|
||||
{JS(mpt_issuance_id),
|
||||
validation::Required{},
|
||||
|
||||
@@ -59,6 +59,7 @@ target_link_libraries(
|
||||
fmt::fmt
|
||||
openssl::openssl
|
||||
xrpl::libxrpl
|
||||
rpcspec::rpcspec
|
||||
Threads::Threads
|
||||
clio_options
|
||||
clio_rpc_center
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
#include "util/LedgerUtils.hpp"
|
||||
|
||||
#include <rpcspec/detail/XrplParse.hpp>
|
||||
#include <rpcspec/LedgerTypes.hpp>
|
||||
#include <xrpl/protocol/LedgerFormats.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace util {
|
||||
|
||||
// TODO: both lookups reach into rpcspec's detail namespace; they switch to the public
|
||||
// rpcspec ledger-types API in the next PR.
|
||||
|
||||
xrpl::LedgerEntryType
|
||||
LedgerTypes::getLedgerEntryTypeFromStr(std::string const& entryName)
|
||||
{
|
||||
return rpc::spec::detail::ledgerEntryTypeFromStr(entryName);
|
||||
return rpc::spec::ledgerEntryTypeFromStr(entryName);
|
||||
}
|
||||
|
||||
xrpl::LedgerEntryType
|
||||
LedgerTypes::getAccountOwnedLedgerTypeFromStr(std::string const& entryName)
|
||||
{
|
||||
return rpc::spec::detail::accountOwnedLedgerTypeFromStr(entryName);
|
||||
return rpc::spec::accountOwnedLedgerTypeFromStr(entryName);
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <rpcspec/detail/XrplParse.hpp>
|
||||
#include <rpcspec/LedgerTypes.hpp>
|
||||
#include <xrpl/basics/Slice.h>
|
||||
#include <xrpl/basics/StringUtilities.h>
|
||||
#include <xrpl/basics/strHex.h>
|
||||
@@ -22,9 +22,7 @@ namespace util {
|
||||
* @brief A helper class that provides lists of different ledger type category.
|
||||
*/
|
||||
class LedgerTypes {
|
||||
// TODO: reaches into rpcspec's detail namespace; switches to the public rpcspec
|
||||
// ledger-types API in the next PR.
|
||||
static constexpr auto const& kLedgerTypes = rpc::spec::detail::kLedgerTypesTable;
|
||||
static constexpr auto const& kLedgerTypes = rpc::spec::kLedgerTypesTable;
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -49,10 +47,8 @@ public:
|
||||
static constexpr auto
|
||||
getDeletionBlockerLedgerTypes()
|
||||
{
|
||||
// TODO: LedgerCategory comes from rpcspec's detail namespace; switches to the
|
||||
// public rpcspec ledger-types API in the next PR.
|
||||
constexpr auto kFilter = [](auto const& item) {
|
||||
return item.category == rpc::spec::detail::LedgerCategory::DeletionBlocker;
|
||||
return item.category == rpc::spec::LedgerCategory::DeletionBlocker;
|
||||
};
|
||||
|
||||
constexpr auto kDeletionBlockersCount =
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "util/JsonUtils.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <rpcspec/detail/TxTypes.hpp>
|
||||
#include <rpcspec/TxTypes.hpp>
|
||||
#include <xrpl/protocol/TxFormats.h>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -12,7 +12,7 @@ TEST(TxUtilTests, txTypesInLowercase)
|
||||
{
|
||||
// TODO: reaches into rpcspec's detail namespace; switches to the public rpcspec
|
||||
// tx-types API in the next PR.
|
||||
auto const& types = rpc::spec::detail::txTypesInLowercase();
|
||||
auto const& types = rpc::spec::txTypesInLowercase();
|
||||
ASSERT_TRUE(
|
||||
std::size_t(
|
||||
std::distance(
|
||||
|
||||
Reference in New Issue
Block a user