mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
@@ -20,6 +20,7 @@
|
||||
#include "rpc/Errors.hpp"
|
||||
|
||||
#include "rpc/JS.hpp"
|
||||
#include "util/OverloadSet.hpp"
|
||||
|
||||
#include <boost/json/object.hpp>
|
||||
#include <xrpl/protocol/ErrorCodes.h>
|
||||
@@ -36,17 +37,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace {
|
||||
template <typename... Ts>
|
||||
struct overloadSet : Ts... {
|
||||
using Ts::operator()...;
|
||||
};
|
||||
|
||||
// explicit deduction guide (not needed as of C++20, but clang be clang)
|
||||
template <typename... Ts>
|
||||
overloadSet(Ts...) -> overloadSet<Ts...>;
|
||||
} // namespace
|
||||
|
||||
namespace rpc {
|
||||
|
||||
WarningInfo const&
|
||||
@@ -149,7 +139,7 @@ makeError(Status const& status)
|
||||
auto wrapOptional = [](string_view const& str) { return str.empty() ? nullopt : make_optional(str); };
|
||||
|
||||
auto res = visit(
|
||||
overloadSet{
|
||||
util::OverloadSet{
|
||||
[&status, &wrapOptional](RippledError err) {
|
||||
if (err == ripple::rpcUNKNOWN)
|
||||
return boost::json::object{{"error", status.message}, {"type", "response"}, {"status", "error"}};
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
#include "data/BackendInterface.hpp"
|
||||
#include "data/DBHelpers.hpp"
|
||||
#include "feed/SubscriptionManagerInterface.hpp"
|
||||
#include "main/Build.hpp"
|
||||
#include "rpc/Errors.hpp"
|
||||
#include "rpc/JS.hpp"
|
||||
#include "rpc/common/Specs.hpp"
|
||||
#include "rpc/common/Types.hpp"
|
||||
#include "util/build/Build.hpp"
|
||||
|
||||
#include <boost/json/conversion.hpp>
|
||||
#include <boost/json/object.hpp>
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
uint32_t loadFactor = 1u;
|
||||
std::chrono::time_point<std::chrono::system_clock> time = std::chrono::system_clock::now();
|
||||
std::chrono::seconds uptime = {};
|
||||
std::string clioVersion = Build::getClioVersionString();
|
||||
std::string clioVersion = util::build::getClioVersionString();
|
||||
std::string xrplVersion = ripple::BuildInfo::getVersionString();
|
||||
std::optional<boost::json::object> rippledInfo = std::nullopt;
|
||||
ValidatedLedgerSection validatedLedger = {};
|
||||
|
||||
Reference in New Issue
Block a user