mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Revert "Add [overlay] configuration section (experimental):"
This reverts commit 856fd9d69f.
This commit is contained in:
@@ -220,6 +220,19 @@
|
||||
#define RIPPLE_SINGLE_IO_SERVICE_THREAD 0
|
||||
#endif
|
||||
|
||||
/** Config: RIPPLE_STRUCTURED_OVERLAY_CLIENT
|
||||
RIPPLE_STRUCTURED_OVERLAY_SERVER
|
||||
Enables Structured Overlay support for the client or server roles.
|
||||
This feature is currently in development:
|
||||
https://ripplelabs.atlassian.net/browse/RIPD-157
|
||||
*/
|
||||
#ifndef RIPPLE_STRUCTURED_OVERLAY_CLIENT
|
||||
#define RIPPLE_STRUCTURED_OVERLAY_CLIENT 0
|
||||
#endif
|
||||
#ifndef RIPPLE_STRUCTURED_OVERLAY_SERVER
|
||||
#define RIPPLE_STRUCTURED_OVERLAY_SERVER 1
|
||||
#endif
|
||||
|
||||
/** Config: RIPPLE_ASYNC_RPC_HANDLER
|
||||
*/
|
||||
#ifndef RIPPLE_ASYNC_RPC_HANDLER
|
||||
|
||||
@@ -71,17 +71,6 @@ OverlayImpl::OverlayImpl (Stoppable& parent,
|
||||
, m_resolver (resolver)
|
||||
, m_nextShortId (0)
|
||||
{
|
||||
auto const& section = getConfig()["overlay"];
|
||||
set (setup_.use_handshake, "use_handshake", section);
|
||||
set (setup_.auto_connect, "auto_connect", section);
|
||||
std::string promote;
|
||||
set (promote, "become_superpeer", section);
|
||||
if (promote == "never")
|
||||
setup_.promote = Promote::never;
|
||||
else if (promote == "always")
|
||||
setup_.promote = Promote::always;
|
||||
else
|
||||
setup_.promote = Promote::automatic;
|
||||
}
|
||||
|
||||
OverlayImpl::~OverlayImpl ()
|
||||
@@ -94,12 +83,6 @@ OverlayImpl::~OverlayImpl ()
|
||||
return this->m_child_count == 0; });
|
||||
}
|
||||
|
||||
OverlayImpl::Setup const&
|
||||
OverlayImpl::setup() const
|
||||
{
|
||||
return setup_;
|
||||
}
|
||||
|
||||
void
|
||||
OverlayImpl::accept (socket_type&& socket)
|
||||
{
|
||||
@@ -453,10 +436,10 @@ OverlayImpl::getActivePeers ()
|
||||
|
||||
ret.reserve (m_publicKeyMap.size ());
|
||||
|
||||
for (auto const& e : m_publicKeyMap)
|
||||
for (auto const& pair : m_publicKeyMap)
|
||||
{
|
||||
assert (e.second);
|
||||
ret.push_back (e.second);
|
||||
assert (pair.second);
|
||||
ret.push_back (pair.second);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -52,29 +52,13 @@ private:
|
||||
using error_code = boost::system::error_code;
|
||||
using yield_context = boost::asio::yield_context;
|
||||
|
||||
enum class Promote
|
||||
{
|
||||
automatic,
|
||||
never,
|
||||
always
|
||||
};
|
||||
|
||||
struct Setup
|
||||
{
|
||||
bool use_handshake = false;
|
||||
bool auto_connect = true;
|
||||
Promote promote = Promote::automatic;
|
||||
};
|
||||
|
||||
typedef hash_map <PeerFinder::Slot::ptr,
|
||||
std::weak_ptr <PeerImp>> PeersBySlot;
|
||||
std::weak_ptr <PeerImp>> PeersBySlot;
|
||||
|
||||
typedef hash_map <RippleAddress, Peer::ptr> PeerByPublicKey;
|
||||
|
||||
typedef hash_map <Peer::ShortId, Peer::ptr> PeerByShortId;
|
||||
|
||||
Setup setup_;
|
||||
|
||||
// VFALCO TODO Change to regular mutex and eliminate re-entrancy
|
||||
std::recursive_mutex m_mutex;
|
||||
|
||||
@@ -130,9 +114,6 @@ public:
|
||||
OverlayImpl (OverlayImpl const&) = delete;
|
||||
OverlayImpl& operator= (OverlayImpl const&) = delete;
|
||||
|
||||
Setup const&
|
||||
setup() const;
|
||||
|
||||
void
|
||||
connect (beast::IP::Endpoint const& remote_endpoint) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user