mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
refactor: Decouple net from xrpld and move rpc-related classes to the rpc folder (#5477)
As a step of modularisation, this change moves code from `xrpld` to `libxrpl`.
This commit is contained in:
@@ -10,9 +10,6 @@ Loop: xrpld.app xrpld.core
|
|||||||
Loop: xrpld.app xrpld.ledger
|
Loop: xrpld.app xrpld.ledger
|
||||||
xrpld.app > xrpld.ledger
|
xrpld.app > xrpld.ledger
|
||||||
|
|
||||||
Loop: xrpld.app xrpld.net
|
|
||||||
xrpld.app > xrpld.net
|
|
||||||
|
|
||||||
Loop: xrpld.app xrpld.overlay
|
Loop: xrpld.app xrpld.overlay
|
||||||
xrpld.overlay > xrpld.app
|
xrpld.overlay > xrpld.app
|
||||||
|
|
||||||
@@ -25,15 +22,9 @@ Loop: xrpld.app xrpld.rpc
|
|||||||
Loop: xrpld.app xrpld.shamap
|
Loop: xrpld.app xrpld.shamap
|
||||||
xrpld.app > xrpld.shamap
|
xrpld.app > xrpld.shamap
|
||||||
|
|
||||||
Loop: xrpld.core xrpld.net
|
|
||||||
xrpld.net > xrpld.core
|
|
||||||
|
|
||||||
Loop: xrpld.core xrpld.perflog
|
Loop: xrpld.core xrpld.perflog
|
||||||
xrpld.perflog == xrpld.core
|
xrpld.perflog == xrpld.core
|
||||||
|
|
||||||
Loop: xrpld.net xrpld.rpc
|
|
||||||
xrpld.rpc ~= xrpld.net
|
|
||||||
|
|
||||||
Loop: xrpld.overlay xrpld.rpc
|
Loop: xrpld.overlay xrpld.rpc
|
||||||
xrpld.rpc ~= xrpld.overlay
|
xrpld.rpc ~= xrpld.overlay
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ libxrpl.basics > xrpl.basics
|
|||||||
libxrpl.crypto > xrpl.basics
|
libxrpl.crypto > xrpl.basics
|
||||||
libxrpl.json > xrpl.basics
|
libxrpl.json > xrpl.basics
|
||||||
libxrpl.json > xrpl.json
|
libxrpl.json > xrpl.json
|
||||||
|
libxrpl.net > xrpl.basics
|
||||||
|
libxrpl.net > xrpl.net
|
||||||
libxrpl.protocol > xrpl.basics
|
libxrpl.protocol > xrpl.basics
|
||||||
libxrpl.protocol > xrpl.json
|
libxrpl.protocol > xrpl.json
|
||||||
libxrpl.protocol > xrpl.protocol
|
libxrpl.protocol > xrpl.protocol
|
||||||
@@ -62,9 +64,9 @@ test.jtx > xrpl.basics
|
|||||||
test.jtx > xrpld.app
|
test.jtx > xrpld.app
|
||||||
test.jtx > xrpld.core
|
test.jtx > xrpld.core
|
||||||
test.jtx > xrpld.ledger
|
test.jtx > xrpld.ledger
|
||||||
test.jtx > xrpld.net
|
|
||||||
test.jtx > xrpld.rpc
|
test.jtx > xrpld.rpc
|
||||||
test.jtx > xrpl.json
|
test.jtx > xrpl.json
|
||||||
|
test.jtx > xrpl.net
|
||||||
test.jtx > xrpl.protocol
|
test.jtx > xrpl.protocol
|
||||||
test.jtx > xrpl.resource
|
test.jtx > xrpl.resource
|
||||||
test.jtx > xrpl.server
|
test.jtx > xrpl.server
|
||||||
@@ -109,7 +111,6 @@ test.rpc > test.toplevel
|
|||||||
test.rpc > xrpl.basics
|
test.rpc > xrpl.basics
|
||||||
test.rpc > xrpld.app
|
test.rpc > xrpld.app
|
||||||
test.rpc > xrpld.core
|
test.rpc > xrpld.core
|
||||||
test.rpc > xrpld.net
|
|
||||||
test.rpc > xrpld.overlay
|
test.rpc > xrpld.overlay
|
||||||
test.rpc > xrpld.rpc
|
test.rpc > xrpld.rpc
|
||||||
test.rpc > xrpl.json
|
test.rpc > xrpl.json
|
||||||
@@ -134,6 +135,7 @@ test.toplevel > xrpl.json
|
|||||||
test.unit_test > xrpl.basics
|
test.unit_test > xrpl.basics
|
||||||
tests.libxrpl > xrpl.basics
|
tests.libxrpl > xrpl.basics
|
||||||
xrpl.json > xrpl.basics
|
xrpl.json > xrpl.basics
|
||||||
|
xrpl.net > xrpl.basics
|
||||||
xrpl.protocol > xrpl.basics
|
xrpl.protocol > xrpl.basics
|
||||||
xrpl.protocol > xrpl.json
|
xrpl.protocol > xrpl.json
|
||||||
xrpl.resource > xrpl.basics
|
xrpl.resource > xrpl.basics
|
||||||
@@ -149,6 +151,7 @@ xrpld.app > xrpld.consensus
|
|||||||
xrpld.app > xrpld.nodestore
|
xrpld.app > xrpld.nodestore
|
||||||
xrpld.app > xrpld.perflog
|
xrpld.app > xrpld.perflog
|
||||||
xrpld.app > xrpl.json
|
xrpld.app > xrpl.json
|
||||||
|
xrpld.app > xrpl.net
|
||||||
xrpld.app > xrpl.protocol
|
xrpld.app > xrpl.protocol
|
||||||
xrpld.app > xrpl.resource
|
xrpld.app > xrpl.resource
|
||||||
xrpld.conditions > xrpl.basics
|
xrpld.conditions > xrpl.basics
|
||||||
@@ -158,14 +161,11 @@ xrpld.consensus > xrpl.json
|
|||||||
xrpld.consensus > xrpl.protocol
|
xrpld.consensus > xrpl.protocol
|
||||||
xrpld.core > xrpl.basics
|
xrpld.core > xrpl.basics
|
||||||
xrpld.core > xrpl.json
|
xrpld.core > xrpl.json
|
||||||
|
xrpld.core > xrpl.net
|
||||||
xrpld.core > xrpl.protocol
|
xrpld.core > xrpl.protocol
|
||||||
xrpld.ledger > xrpl.basics
|
xrpld.ledger > xrpl.basics
|
||||||
xrpld.ledger > xrpl.json
|
xrpld.ledger > xrpl.json
|
||||||
xrpld.ledger > xrpl.protocol
|
xrpld.ledger > xrpl.protocol
|
||||||
xrpld.net > xrpl.basics
|
|
||||||
xrpld.net > xrpl.json
|
|
||||||
xrpld.net > xrpl.protocol
|
|
||||||
xrpld.net > xrpl.resource
|
|
||||||
xrpld.nodestore > xrpl.basics
|
xrpld.nodestore > xrpl.basics
|
||||||
xrpld.nodestore > xrpld.core
|
xrpld.nodestore > xrpld.core
|
||||||
xrpld.nodestore > xrpld.unity
|
xrpld.nodestore > xrpld.unity
|
||||||
@@ -189,6 +189,7 @@ xrpld.rpc > xrpld.core
|
|||||||
xrpld.rpc > xrpld.ledger
|
xrpld.rpc > xrpld.ledger
|
||||||
xrpld.rpc > xrpld.nodestore
|
xrpld.rpc > xrpld.nodestore
|
||||||
xrpld.rpc > xrpl.json
|
xrpld.rpc > xrpl.json
|
||||||
|
xrpld.rpc > xrpl.net
|
||||||
xrpld.rpc > xrpl.protocol
|
xrpld.rpc > xrpl.protocol
|
||||||
xrpld.rpc > xrpl.resource
|
xrpld.rpc > xrpl.resource
|
||||||
xrpld.rpc > xrpl.server
|
xrpld.rpc > xrpl.server
|
||||||
|
|||||||
@@ -99,6 +99,15 @@ target_link_libraries(xrpl.libxrpl.protocol PUBLIC
|
|||||||
add_module(xrpl resource)
|
add_module(xrpl resource)
|
||||||
target_link_libraries(xrpl.libxrpl.resource PUBLIC xrpl.libxrpl.protocol)
|
target_link_libraries(xrpl.libxrpl.resource PUBLIC xrpl.libxrpl.protocol)
|
||||||
|
|
||||||
|
# Level 06
|
||||||
|
add_module(xrpl net)
|
||||||
|
target_link_libraries(xrpl.libxrpl.net PUBLIC
|
||||||
|
xrpl.libxrpl.basics
|
||||||
|
xrpl.libxrpl.json
|
||||||
|
xrpl.libxrpl.protocol
|
||||||
|
xrpl.libxrpl.resource
|
||||||
|
)
|
||||||
|
|
||||||
add_module(xrpl server)
|
add_module(xrpl server)
|
||||||
target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol)
|
target_link_libraries(xrpl.libxrpl.server PUBLIC xrpl.libxrpl.protocol)
|
||||||
|
|
||||||
@@ -121,6 +130,7 @@ target_link_modules(xrpl PUBLIC
|
|||||||
protocol
|
protocol
|
||||||
resource
|
resource
|
||||||
server
|
server
|
||||||
|
net
|
||||||
)
|
)
|
||||||
|
|
||||||
# All headers in libxrpl are in modules.
|
# All headers in libxrpl are in modules.
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ install (
|
|||||||
xrpl.libxrpl.protocol
|
xrpl.libxrpl.protocol
|
||||||
xrpl.libxrpl.resource
|
xrpl.libxrpl.resource
|
||||||
xrpl.libxrpl.server
|
xrpl.libxrpl.server
|
||||||
|
xrpl.libxrpl.net
|
||||||
xrpl.libxrpl
|
xrpl.libxrpl
|
||||||
antithesis-sdk-cpp
|
antithesis-sdk-cpp
|
||||||
EXPORT RippleExports
|
EXPORT RippleExports
|
||||||
|
|||||||
@@ -20,9 +20,8 @@
|
|||||||
#ifndef RIPPLE_NET_HTTPCLIENT_H_INCLUDED
|
#ifndef RIPPLE_NET_HTTPCLIENT_H_INCLUDED
|
||||||
#define RIPPLE_NET_HTTPCLIENT_H_INCLUDED
|
#define RIPPLE_NET_HTTPCLIENT_H_INCLUDED
|
||||||
|
|
||||||
#include <xrpld/core/Config.h>
|
|
||||||
|
|
||||||
#include <xrpl/basics/ByteUtilities.h>
|
#include <xrpl/basics/ByteUtilities.h>
|
||||||
|
#include <xrpl/beast/utility/Journal.h>
|
||||||
|
|
||||||
#include <boost/asio/io_service.hpp>
|
#include <boost/asio/io_service.hpp>
|
||||||
#include <boost/asio/streambuf.hpp>
|
#include <boost/asio/streambuf.hpp>
|
||||||
@@ -44,7 +43,11 @@ public:
|
|||||||
static constexpr auto maxClientHeaderBytes = kilobytes(32);
|
static constexpr auto maxClientHeaderBytes = kilobytes(32);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
initializeSSLContext(Config const& config, beast::Journal j);
|
initializeSSLContext(
|
||||||
|
std::string const& sslVerifyDir,
|
||||||
|
std::string const& sslVerifyFile,
|
||||||
|
bool sslVerify,
|
||||||
|
beast::Journal j);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get(bool bSSL,
|
get(bool bSSL,
|
||||||
@@ -20,11 +20,10 @@
|
|||||||
#ifndef RIPPLE_NET_HTTPCLIENTSSLCONTEXT_H_INCLUDED
|
#ifndef RIPPLE_NET_HTTPCLIENTSSLCONTEXT_H_INCLUDED
|
||||||
#define RIPPLE_NET_HTTPCLIENTSSLCONTEXT_H_INCLUDED
|
#define RIPPLE_NET_HTTPCLIENTSSLCONTEXT_H_INCLUDED
|
||||||
|
|
||||||
#include <xrpld/core/Config.h>
|
|
||||||
#include <xrpld/net/RegisterSSLCerts.h>
|
|
||||||
|
|
||||||
#include <xrpl/basics/Log.h>
|
#include <xrpl/basics/Log.h>
|
||||||
#include <xrpl/basics/contract.h>
|
#include <xrpl/basics/contract.h>
|
||||||
|
#include <xrpl/beast/utility/Journal.h>
|
||||||
|
#include <xrpl/net/RegisterSSLCerts.h>
|
||||||
|
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <boost/asio/ip/tcp.hpp>
|
#include <boost/asio/ip/tcp.hpp>
|
||||||
@@ -37,31 +36,33 @@ class HTTPClientSSLContext
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit HTTPClientSSLContext(
|
explicit HTTPClientSSLContext(
|
||||||
Config const& config,
|
std::string const& sslVerifyDir,
|
||||||
|
std::string const& sslVerifyFile,
|
||||||
|
bool sslVerify,
|
||||||
beast::Journal j,
|
beast::Journal j,
|
||||||
boost::asio::ssl::context_base::method method =
|
boost::asio::ssl::context_base::method method =
|
||||||
boost::asio::ssl::context::sslv23)
|
boost::asio::ssl::context::sslv23)
|
||||||
: ssl_context_{method}, j_(j), verify_{config.SSL_VERIFY}
|
: ssl_context_{method}, j_(j), verify_{sslVerify}
|
||||||
{
|
{
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
|
|
||||||
if (config.SSL_VERIFY_FILE.empty())
|
if (sslVerifyFile.empty())
|
||||||
{
|
{
|
||||||
registerSSLCerts(ssl_context_, ec, j_);
|
registerSSLCerts(ssl_context_, ec, j_);
|
||||||
|
|
||||||
if (ec && config.SSL_VERIFY_DIR.empty())
|
if (ec && sslVerifyDir.empty())
|
||||||
Throw<std::runtime_error>(boost::str(
|
Throw<std::runtime_error>(boost::str(
|
||||||
boost::format("Failed to set_default_verify_paths: %s") %
|
boost::format("Failed to set_default_verify_paths: %s") %
|
||||||
ec.message()));
|
ec.message()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ssl_context_.load_verify_file(config.SSL_VERIFY_FILE);
|
ssl_context_.load_verify_file(sslVerifyFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config.SSL_VERIFY_DIR.empty())
|
if (!sslVerifyDir.empty())
|
||||||
{
|
{
|
||||||
ssl_context_.add_verify_path(config.SSL_VERIFY_DIR, ec);
|
ssl_context_.add_verify_path(sslVerifyDir, ec);
|
||||||
|
|
||||||
if (ec)
|
if (ec)
|
||||||
Throw<std::runtime_error>(boost::str(
|
Throw<std::runtime_error>(boost::str(
|
||||||
@@ -17,12 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
#include <xrpld/net/AutoSocket.h>
|
|
||||||
#include <xrpld/net/HTTPClient.h>
|
|
||||||
#include <xrpld/net/HTTPClientSSLContext.h>
|
|
||||||
|
|
||||||
#include <xrpl/basics/Log.h>
|
#include <xrpl/basics/Log.h>
|
||||||
#include <xrpl/beast/core/LexicalCast.h>
|
#include <xrpl/beast/core/LexicalCast.h>
|
||||||
|
#include <xrpl/net/AutoSocket.h>
|
||||||
|
#include <xrpl/net/HTTPClient.h>
|
||||||
|
#include <xrpl/net/HTTPClientSSLContext.h>
|
||||||
|
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <boost/asio/ip/tcp.hpp>
|
#include <boost/asio/ip/tcp.hpp>
|
||||||
@@ -36,9 +35,13 @@ namespace ripple {
|
|||||||
static std::optional<HTTPClientSSLContext> httpClientSSLContext;
|
static std::optional<HTTPClientSSLContext> httpClientSSLContext;
|
||||||
|
|
||||||
void
|
void
|
||||||
HTTPClient::initializeSSLContext(Config const& config, beast::Journal j)
|
HTTPClient::initializeSSLContext(
|
||||||
|
std::string const& sslVerifyDir,
|
||||||
|
std::string const& sslVerifyFile,
|
||||||
|
bool sslVerify,
|
||||||
|
beast::Journal j)
|
||||||
{
|
{
|
||||||
httpClientSSLContext.emplace(config, j);
|
httpClientSSLContext.emplace(sslVerifyDir, sslVerifyFile, sslVerify, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
#include <xrpld/net/RegisterSSLCerts.h>
|
#include <xrpl/net/RegisterSSLCerts.h>
|
||||||
|
|
||||||
#if BOOST_OS_WINDOWS
|
#if BOOST_OS_WINDOWS
|
||||||
#include <boost/asio/ssl/error.hpp>
|
#include <boost/asio/ssl/error.hpp>
|
||||||
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
@@ -30,12 +30,12 @@
|
|||||||
|
|
||||||
#include <xrpld/app/ledger/LedgerMaster.h>
|
#include <xrpld/app/ledger/LedgerMaster.h>
|
||||||
#include <xrpld/app/misc/NetworkOPs.h>
|
#include <xrpld/app/misc/NetworkOPs.h>
|
||||||
#include <xrpld/net/HTTPClient.h>
|
#include <xrpld/rpc/RPCCall.h>
|
||||||
#include <xrpld/net/RPCCall.h>
|
|
||||||
|
|
||||||
#include <xrpl/basics/Slice.h>
|
#include <xrpl/basics/Slice.h>
|
||||||
#include <xrpl/basics/contract.h>
|
#include <xrpl/basics/contract.h>
|
||||||
#include <xrpl/json/to_string.h>
|
#include <xrpl/json/to_string.h>
|
||||||
|
#include <xrpl/net/HTTPClient.h>
|
||||||
#include <xrpl/protocol/ErrorCodes.h>
|
#include <xrpl/protocol/ErrorCodes.h>
|
||||||
#include <xrpl/protocol/Indexes.h>
|
#include <xrpl/protocol/Indexes.h>
|
||||||
#include <xrpl/protocol/Serializer.h>
|
#include <xrpl/protocol/Serializer.h>
|
||||||
@@ -74,7 +74,11 @@ Env::AppBundle::AppBundle(
|
|||||||
auto timeKeeper_ = std::make_unique<ManualTimeKeeper>();
|
auto timeKeeper_ = std::make_unique<ManualTimeKeeper>();
|
||||||
timeKeeper = timeKeeper_.get();
|
timeKeeper = timeKeeper_.get();
|
||||||
// Hack so we don't have to call Config::setup
|
// Hack so we don't have to call Config::setup
|
||||||
HTTPClient::initializeSSLContext(*config, debugLog());
|
HTTPClient::initializeSSLContext(
|
||||||
|
config->SSL_VERIFY_DIR,
|
||||||
|
config->SSL_VERIFY_FILE,
|
||||||
|
config->SSL_VERIFY,
|
||||||
|
debugLog());
|
||||||
owned = make_Application(
|
owned = make_Application(
|
||||||
std::move(config), std::move(logs), std::move(timeKeeper_));
|
std::move(config), std::move(logs), std::move(timeKeeper_));
|
||||||
app = owned.get();
|
app = owned.get();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include <test/jtx/utility.h>
|
#include <test/jtx/utility.h>
|
||||||
|
|
||||||
#include <xrpld/net/RPCCall.h>
|
#include <xrpld/rpc/RPCCall.h>
|
||||||
|
|
||||||
#include <xrpl/basics/contract.h>
|
#include <xrpl/basics/contract.h>
|
||||||
#include <xrpl/json/Object.h>
|
#include <xrpl/json/Object.h>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include <test/jtx.h>
|
#include <test/jtx.h>
|
||||||
#include <test/jtx/utility.h>
|
#include <test/jtx/utility.h>
|
||||||
|
|
||||||
#include <xrpld/net/RPCCall.h>
|
#include <xrpld/rpc/RPCCall.h>
|
||||||
#include <xrpld/rpc/detail/RPCHelpers.h>
|
#include <xrpld/rpc/detail/RPCHelpers.h>
|
||||||
|
|
||||||
#include <xrpl/beast/unit_test.h>
|
#include <xrpl/beast/unit_test.h>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#ifndef RIPPLE_APP_LEDGER_BOOKLISTENERS_H_INCLUDED
|
#ifndef RIPPLE_APP_LEDGER_BOOKLISTENERS_H_INCLUDED
|
||||||
#define RIPPLE_APP_LEDGER_BOOKLISTENERS_H_INCLUDED
|
#define RIPPLE_APP_LEDGER_BOOKLISTENERS_H_INCLUDED
|
||||||
|
|
||||||
#include <xrpld/net/InfoSub.h>
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
|
|
||||||
#include <xrpl/protocol/MultiApiJson.h>
|
#include <xrpl/protocol/MultiApiJson.h>
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
#include <xrpld/app/main/Application.h>
|
#include <xrpld/app/main/Application.h>
|
||||||
#include <xrpld/core/JobQueue.h>
|
#include <xrpld/core/JobQueue.h>
|
||||||
#include <xrpld/net/InfoSub.h>
|
|
||||||
#include <xrpld/rpc/Context.h>
|
#include <xrpld/rpc/Context.h>
|
||||||
#include <xrpld/rpc/GRPCHandlers.h>
|
#include <xrpld/rpc/GRPCHandlers.h>
|
||||||
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
#include <xrpld/rpc/Role.h>
|
#include <xrpld/rpc/Role.h>
|
||||||
#include <xrpld/rpc/detail/Handler.h>
|
#include <xrpld/rpc/detail/Handler.h>
|
||||||
#include <xrpld/rpc/detail/RPCHelpers.h>
|
#include <xrpld/rpc/detail/RPCHelpers.h>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <xrpld/core/Config.h>
|
#include <xrpld/core/Config.h>
|
||||||
#include <xrpld/core/ConfigSections.h>
|
#include <xrpld/core/ConfigSections.h>
|
||||||
#include <xrpld/core/TimeKeeper.h>
|
#include <xrpld/core/TimeKeeper.h>
|
||||||
#include <xrpld/net/RPCCall.h>
|
#include <xrpld/rpc/RPCCall.h>
|
||||||
|
|
||||||
#include <xrpl/basics/Log.h>
|
#include <xrpl/basics/Log.h>
|
||||||
#include <xrpl/beast/core/CurrentThreadName.h>
|
#include <xrpl/beast/core/CurrentThreadName.h>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <xrpld/app/ledger/Ledger.h>
|
#include <xrpld/app/ledger/Ledger.h>
|
||||||
#include <xrpld/core/JobQueue.h>
|
#include <xrpld/core/JobQueue.h>
|
||||||
#include <xrpld/ledger/ReadView.h>
|
#include <xrpld/ledger/ReadView.h>
|
||||||
#include <xrpld/net/InfoSub.h>
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
|
|
||||||
#include <xrpl/protocol/STValidation.h>
|
#include <xrpl/protocol/STValidation.h>
|
||||||
#include <xrpl/protocol/messages.h>
|
#include <xrpl/protocol/messages.h>
|
||||||
|
|||||||
@@ -33,7 +33,12 @@ WorkSSL::WorkSSL(
|
|||||||
bool lastStatus,
|
bool lastStatus,
|
||||||
callback_type cb)
|
callback_type cb)
|
||||||
: WorkBase(host, path, port, ios, lastEndpoint, lastStatus, cb)
|
: WorkBase(host, path, port, ios, lastEndpoint, lastStatus, cb)
|
||||||
, context_(config, j, boost::asio::ssl::context::tlsv12_client)
|
, context_(
|
||||||
|
config.SSL_VERIFY_DIR,
|
||||||
|
config.SSL_VERIFY_FILE,
|
||||||
|
config.SSL_VERIFY,
|
||||||
|
j,
|
||||||
|
boost::asio::ssl::context::tlsv12_client)
|
||||||
, stream_(socket_, context_.context())
|
, stream_(socket_, context_.context())
|
||||||
{
|
{
|
||||||
auto ec = context_.preConnectVerify(stream_, host_);
|
auto ec = context_.preConnectVerify(stream_, host_);
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
#include <xrpld/app/misc/detail/WorkBase.h>
|
#include <xrpld/app/misc/detail/WorkBase.h>
|
||||||
#include <xrpld/core/Config.h>
|
#include <xrpld/core/Config.h>
|
||||||
#include <xrpld/net/HTTPClientSSLContext.h>
|
|
||||||
|
|
||||||
#include <xrpl/basics/contract.h>
|
#include <xrpl/basics/contract.h>
|
||||||
|
#include <xrpl/net/HTTPClientSSLContext.h>
|
||||||
|
|
||||||
#include <boost/asio/ssl.hpp>
|
#include <boost/asio/ssl.hpp>
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <xrpld/app/ledger/Ledger.h>
|
#include <xrpld/app/ledger/Ledger.h>
|
||||||
#include <xrpld/app/paths/Pathfinder.h>
|
#include <xrpld/app/paths/Pathfinder.h>
|
||||||
#include <xrpld/app/paths/RippleLineCache.h>
|
#include <xrpld/app/paths/RippleLineCache.h>
|
||||||
#include <xrpld/net/InfoSub.h>
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
|
|
||||||
#include <xrpl/basics/base_uint.h>
|
#include <xrpl/basics/base_uint.h>
|
||||||
#include <xrpl/json/json_value.h>
|
#include <xrpl/json/json_value.h>
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include <xrpld/core/Config.h>
|
#include <xrpld/core/Config.h>
|
||||||
#include <xrpld/core/ConfigSections.h>
|
#include <xrpld/core/ConfigSections.h>
|
||||||
#include <xrpld/net/HTTPClient.h>
|
|
||||||
|
|
||||||
#include <xrpl/basics/FileUtilities.h>
|
#include <xrpl/basics/FileUtilities.h>
|
||||||
#include <xrpl/basics/Log.h>
|
#include <xrpl/basics/Log.h>
|
||||||
@@ -27,6 +26,7 @@
|
|||||||
#include <xrpl/basics/contract.h>
|
#include <xrpl/basics/contract.h>
|
||||||
#include <xrpl/beast/core/LexicalCast.h>
|
#include <xrpl/beast/core/LexicalCast.h>
|
||||||
#include <xrpl/json/json_reader.h>
|
#include <xrpl/json/json_reader.h>
|
||||||
|
#include <xrpl/net/HTTPClient.h>
|
||||||
#include <xrpl/protocol/Feature.h>
|
#include <xrpl/protocol/Feature.h>
|
||||||
#include <xrpl/protocol/SystemParameters.h>
|
#include <xrpl/protocol/SystemParameters.h>
|
||||||
|
|
||||||
@@ -409,7 +409,8 @@ Config::setup(
|
|||||||
legacy("database_path", boost::filesystem::absolute(dataDir).string());
|
legacy("database_path", boost::filesystem::absolute(dataDir).string());
|
||||||
}
|
}
|
||||||
|
|
||||||
HTTPClient::initializeSSLContext(*this, j_);
|
HTTPClient::initializeSSLContext(
|
||||||
|
this->SSL_VERIFY_DIR, this->SSL_VERIFY_FILE, this->SSL_VERIFY, j_);
|
||||||
|
|
||||||
if (RUN_STANDALONE)
|
if (RUN_STANDALONE)
|
||||||
LEDGER_HISTORY = 0;
|
LEDGER_HISTORY = 0;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define RIPPLE_RPC_CONTEXT_H_INCLUDED
|
#define RIPPLE_RPC_CONTEXT_H_INCLUDED
|
||||||
|
|
||||||
#include <xrpld/core/JobQueue.h>
|
#include <xrpld/core/JobQueue.h>
|
||||||
#include <xrpld/net/InfoSub.h>
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
#include <xrpld/rpc/Role.h>
|
#include <xrpld/rpc/Role.h>
|
||||||
|
|
||||||
#include <xrpl/beast/utility/Journal.h>
|
#include <xrpl/beast/utility/Journal.h>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#define RIPPLE_NET_RPCSUB_H_INCLUDED
|
#define RIPPLE_NET_RPCSUB_H_INCLUDED
|
||||||
|
|
||||||
#include <xrpld/core/JobQueue.h>
|
#include <xrpld/core/JobQueue.h>
|
||||||
#include <xrpld/net/InfoSub.h>
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
|
|
||||||
#include <boost/asio/io_service.hpp>
|
#include <boost/asio/io_service.hpp>
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
#include <xrpld/net/InfoSub.h>
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
@@ -17,12 +17,8 @@
|
|||||||
*/
|
*/
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
#include <xrpld/app/main/Application.h>
|
#include <xrpld/rpc/RPCCall.h>
|
||||||
#include <xrpld/core/Config.h>
|
|
||||||
#include <xrpld/net/HTTPClient.h>
|
|
||||||
#include <xrpld/net/RPCCall.h>
|
|
||||||
#include <xrpld/rpc/ServerHandler.h>
|
#include <xrpld/rpc/ServerHandler.h>
|
||||||
#include <xrpld/rpc/detail/RPCHelpers.h>
|
|
||||||
|
|
||||||
#include <xrpl/basics/ByteUtilities.h>
|
#include <xrpl/basics/ByteUtilities.h>
|
||||||
#include <xrpl/basics/Log.h>
|
#include <xrpl/basics/Log.h>
|
||||||
@@ -33,7 +29,10 @@
|
|||||||
#include <xrpl/json/json_forwards.h>
|
#include <xrpl/json/json_forwards.h>
|
||||||
#include <xrpl/json/json_reader.h>
|
#include <xrpl/json/json_reader.h>
|
||||||
#include <xrpl/json/to_string.h>
|
#include <xrpl/json/to_string.h>
|
||||||
|
#include <xrpl/net/HTTPClient.h>
|
||||||
|
#include <xrpl/protocol/ApiVersion.h>
|
||||||
#include <xrpl/protocol/ErrorCodes.h>
|
#include <xrpl/protocol/ErrorCodes.h>
|
||||||
|
#include <xrpl/protocol/PublicKey.h>
|
||||||
#include <xrpl/protocol/RPCErr.h>
|
#include <xrpl/protocol/RPCErr.h>
|
||||||
#include <xrpl/protocol/SystemParameters.h>
|
#include <xrpl/protocol/SystemParameters.h>
|
||||||
#include <xrpl/protocol/UintTypes.h>
|
#include <xrpl/protocol/UintTypes.h>
|
||||||
@@ -160,7 +159,7 @@ private:
|
|||||||
std::string const& strPk,
|
std::string const& strPk,
|
||||||
TokenType type = TokenType::AccountPublic)
|
TokenType type = TokenType::AccountPublic)
|
||||||
{
|
{
|
||||||
if (parseBase58<PublicKey>(type, strPk))
|
if (parseBase58<ripple::PublicKey>(type, strPk))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
auto pkHex = strUnHex(strPk);
|
auto pkHex = strUnHex(strPk);
|
||||||
@@ -1508,7 +1507,7 @@ rpcClient(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ServerHandler::Setup setup;
|
ripple::ServerHandler::Setup setup;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
setup = setup_ServerHandler(
|
setup = setup_ServerHandler(
|
||||||
@@ -24,9 +24,9 @@
|
|||||||
#include <xrpld/app/misc/NetworkOPs.h>
|
#include <xrpld/app/misc/NetworkOPs.h>
|
||||||
#include <xrpld/core/Config.h>
|
#include <xrpld/core/Config.h>
|
||||||
#include <xrpld/core/JobQueue.h>
|
#include <xrpld/core/JobQueue.h>
|
||||||
#include <xrpld/net/InfoSub.h>
|
|
||||||
#include <xrpld/perflog/PerfLog.h>
|
#include <xrpld/perflog/PerfLog.h>
|
||||||
#include <xrpld/rpc/Context.h>
|
#include <xrpld/rpc/Context.h>
|
||||||
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
#include <xrpld/rpc/RPCHandler.h>
|
#include <xrpld/rpc/RPCHandler.h>
|
||||||
#include <xrpld/rpc/Role.h>
|
#include <xrpld/rpc/Role.h>
|
||||||
#include <xrpld/rpc/detail/Handler.h>
|
#include <xrpld/rpc/detail/Handler.h>
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
*/
|
*/
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
#include <xrpld/net/RPCCall.h>
|
#include <xrpld/rpc/RPCCall.h>
|
||||||
#include <xrpld/net/RPCSub.h>
|
#include <xrpld/rpc/RPCSub.h>
|
||||||
|
|
||||||
#include <xrpl/basics/Log.h>
|
#include <xrpl/basics/Log.h>
|
||||||
#include <xrpl/basics/StringUtilities.h>
|
#include <xrpl/basics/StringUtilities.h>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
#ifndef RIPPLE_RPC_WSINFOSUB_H
|
#ifndef RIPPLE_RPC_WSINFOSUB_H
|
||||||
#define RIPPLE_RPC_WSINFOSUB_H
|
#define RIPPLE_RPC_WSINFOSUB_H
|
||||||
|
|
||||||
#include <xrpld/net/InfoSub.h>
|
#include <xrpld/rpc/InfoSub.h>
|
||||||
#include <xrpld/rpc/Role.h>
|
#include <xrpld/rpc/Role.h>
|
||||||
|
|
||||||
#include <xrpl/beast/net/IPAddressConversion.h>
|
#include <xrpl/beast/net/IPAddressConversion.h>
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
#include <xrpld/app/main/Application.h>
|
#include <xrpld/app/main/Application.h>
|
||||||
#include <xrpld/app/misc/NetworkOPs.h>
|
#include <xrpld/app/misc/NetworkOPs.h>
|
||||||
#include <xrpld/ledger/ReadView.h>
|
#include <xrpld/ledger/ReadView.h>
|
||||||
#include <xrpld/net/RPCSub.h>
|
|
||||||
#include <xrpld/rpc/Context.h>
|
#include <xrpld/rpc/Context.h>
|
||||||
|
#include <xrpld/rpc/RPCSub.h>
|
||||||
#include <xrpld/rpc/Role.h>
|
#include <xrpld/rpc/Role.h>
|
||||||
#include <xrpld/rpc/detail/RPCHelpers.h>
|
#include <xrpld/rpc/detail/RPCHelpers.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user