chore: Update libxrpl to 3.2.0 (#3114)

This commit is contained in:
Sergey Kuznetsov
2026-06-25 11:19:12 +01:00
committed by GitHub
parent 3673586be3
commit 9b04d64a0e
257 changed files with 6174 additions and 6312 deletions

View File

@@ -24,8 +24,8 @@ namespace web {
*/
class ProxyIpResolver {
std::unordered_set<std::string> proxyIps_;
// ripple::uint256 doesn't have hash implementation
std::unordered_set<ripple::uint256, ripple::uint256::hasher> proxyTokens_;
// xrpl::uint256 doesn't have hash implementation
std::unordered_set<xrpl::uint256, xrpl::uint256::hasher> proxyTokens_;
public:
/**

View File

@@ -102,7 +102,7 @@ public:
sendInternalError() const
{
connection_->send(
boost::json::serialize(composeError(rpc::RippledError::rpcINTERNAL)),
boost::json::serialize(composeError(rpc::RippledError::RpcInternal)),
boost::beast::http::status::internal_server_error
);
}
@@ -111,7 +111,7 @@ public:
sendNotReadyError() const
{
connection_->send(
boost::json::serialize(composeError(rpc::RippledError::rpcNOT_READY)),
boost::json::serialize(composeError(rpc::RippledError::RpcNotReady)),
boost::beast::http::status::ok
);
}
@@ -121,12 +121,12 @@ public:
{
if (connection_->upgraded) {
connection_->send(
boost::json::serialize(rpc::makeError(rpc::RippledError::rpcTOO_BUSY)),
boost::json::serialize(rpc::makeError(rpc::RippledError::RpcTooBusy)),
boost::beast::http::status::ok
);
} else {
connection_->send(
boost::json::serialize(rpc::makeError(rpc::RippledError::rpcTOO_BUSY)),
boost::json::serialize(rpc::makeError(rpc::RippledError::RpcTooBusy)),
boost::beast::http::status::service_unavailable
);
}
@@ -137,7 +137,7 @@ public:
{
if (connection_->upgraded) {
connection_->send(
boost::json::serialize(rpc::makeError(rpc::RippledError::rpcBAD_SYNTAX))
boost::json::serialize(rpc::makeError(rpc::RippledError::RpcBadSyntax))
);
} else {
connection_->send(

View File

@@ -293,7 +293,7 @@ public:
return sender_(httpResponse(
http::status::internal_server_error,
"application/json",
boost::json::serialize(rpc::makeError(rpc::RippledError::rpcINTERNAL))
boost::json::serialize(rpc::makeError(rpc::RippledError::RpcInternal))
));
}
}
@@ -304,7 +304,7 @@ public:
sender_(httpResponse(
http::status::service_unavailable,
"text/plain",
boost::json::serialize(rpc::makeError(rpc::RippledError::rpcSLOW_DOWN))
boost::json::serialize(rpc::makeError(rpc::RippledError::RpcSlowDown))
));
}

View File

@@ -151,7 +151,7 @@ public:
void
sendSlowDown(std::string const& request) override
{
sendError(rpc::RippledError::rpcSLOW_DOWN, request);
sendError(rpc::RippledError::RpcSlowDown, request);
}
/**
@@ -290,7 +290,7 @@ public:
try {
(*handler_)(requestStr, shared_from_this());
} catch (std::exception const&) {
sendError(rpc::RippledError::rpcINTERNAL, std::move(requestStr));
sendError(rpc::RippledError::RpcInternal, std::move(requestStr));
}
doRead();

View File

@@ -340,7 +340,7 @@ private:
static Response
makeSlowDownResponse(Request const& request, std::optional<boost::json::value> requestJson)
{
auto error = rpc::makeError(rpc::RippledError::rpcSLOW_DOWN);
auto error = rpc::makeError(rpc::RippledError::RpcSlowDown);
if (not request.isHttp()) {
try {

View File

@@ -111,7 +111,7 @@ ErrorHelper::makeInternalError() const
{
return Response{
http::status::internal_server_error,
composeError(rpc::RippledError::rpcINTERNAL),
composeError(rpc::RippledError::RpcInternal),
rawRequest_
};
}
@@ -119,7 +119,7 @@ ErrorHelper::makeInternalError() const
Response
ErrorHelper::makeNotReadyError() const
{
return Response{http::status::ok, composeError(rpc::RippledError::rpcNOT_READY), rawRequest_};
return Response{http::status::ok, composeError(rpc::RippledError::RpcNotReady), rawRequest_};
}
Response
@@ -128,14 +128,14 @@ ErrorHelper::makeTooBusyError() const
if (not rawRequest_.get().isHttp()) {
return Response{
http::status::too_many_requests,
rpc::makeError(rpc::RippledError::rpcTOO_BUSY),
rpc::makeError(rpc::RippledError::RpcTooBusy),
rawRequest_
};
}
return Response{
http::status::service_unavailable,
rpc::makeError(rpc::RippledError::rpcTOO_BUSY),
rpc::makeError(rpc::RippledError::RpcTooBusy),
rawRequest_
};
}
@@ -145,7 +145,7 @@ ErrorHelper::makeJsonParsingError() const
{
if (not rawRequest_.get().isHttp()) {
return Response{
http::status::bad_request, rpc::makeError(rpc::RippledError::rpcBAD_SYNTAX), rawRequest_
http::status::bad_request, rpc::makeError(rpc::RippledError::RpcBadSyntax), rawRequest_
};
}