mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Tidy up sources
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#define RIPPLE_VALIDATORS_CHOSENLIST_H_INCLUDED
|
||||
|
||||
#include <ripple/common/UnorderedContainers.h>
|
||||
#include <ripple/types/api/RipplePublicKeyHash.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace Validators {
|
||||
|
||||
@@ -20,8 +20,14 @@
|
||||
#ifndef RIPPLE_VALIDATORS_LOGIC_H_INCLUDED
|
||||
#define RIPPLE_VALIDATORS_LOGIC_H_INCLUDED
|
||||
|
||||
#include <ripple/validators/impl/Store.h>
|
||||
#include <ripple/validators/impl/ChosenList.h>
|
||||
#include <ripple/validators/impl/Validation.h>
|
||||
#include <ripple/validators/impl/Validator.h>
|
||||
#include <ripple/validators/impl/Tuning.h>
|
||||
#include <beast/chrono/manual_clock.h>
|
||||
#include <beast/container/aged_unordered_set.h>
|
||||
#include <beast/smart_ptr/SharedPtr.h>
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -17,6 +17,17 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <ripple/validators/Manager.h>
|
||||
#include <ripple/validators/impl/Logic.h>
|
||||
#include <ripple/validators/impl/SourceFile.h>
|
||||
#include <ripple/validators/impl/SourceStrings.h>
|
||||
#include <ripple/validators/impl/SourceURL.h>
|
||||
#include <ripple/validators/impl/StoreSqdb.h>
|
||||
#include <beast/module/core/thread/DeadlineTimer.h>
|
||||
#include <beast/threads/ScopedWrapperContext.h>
|
||||
#include <beast/threads/ServiceQueue.h>
|
||||
#include <beast/threads/Thread.h>
|
||||
|
||||
/** ChosenValidators (formerly known as UNL)
|
||||
|
||||
Motivation:
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef RIPPLE_VALIDATORS_SOURCEDESC_H_INCLUDED
|
||||
#define RIPPLE_VALIDATORS_SOURCEDESC_H_INCLUDED
|
||||
|
||||
#include <beast/smart_ptr/SharedPtr.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace Validators {
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <ripple/validators/impl/Utilities.h>
|
||||
#include <beast/module/core/files/RandomAccessFile.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace Validators {
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <beast/module/asio/asio.h>
|
||||
#include <memory>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef RIPPLE_VALIDATORS_STORE_H_INCLUDED
|
||||
#define RIPPLE_VALIDATORS_STORE_H_INCLUDED
|
||||
|
||||
#include <ripple/validators/impl/SourceDesc.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace Validators {
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
#ifndef RIPPLE_VALIDATORS_STORESQDB_H_INCLUDED
|
||||
#define RIPPLE_VALIDATORS_STORESQDB_H_INCLUDED
|
||||
|
||||
#include <ripple/validators/impl/Store.h>
|
||||
#include <beast/module/sqdb/sqdb.h>
|
||||
#include <beast/utility/Error.h>
|
||||
|
||||
namespace ripple {
|
||||
namespace Validators {
|
||||
|
||||
|
||||
@@ -33,70 +33,6 @@ public:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
struct Payload
|
||||
{
|
||||
Payload ()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <class Config>
|
||||
class PeerLogic : public TestOverlay::PeerLogicBase <Config>
|
||||
{
|
||||
public:
|
||||
typedef TestOverlay::PeerLogicBase <Config> Base;
|
||||
typedef typename Config::Payload Payload;
|
||||
typedef typename Base::Connection Connection;
|
||||
typedef typename Base::Peer Peer;
|
||||
typedef typename Base::Message Message;
|
||||
typedef typename Config::SizeType SizeType;
|
||||
|
||||
explicit PeerLogic (Peer& peer)
|
||||
: TestOverlay::PeerLogicBase <Config> (peer)
|
||||
{
|
||||
}
|
||||
|
||||
~PeerLogic ()
|
||||
{
|
||||
}
|
||||
|
||||
void step ()
|
||||
{
|
||||
if (this->peer().id () == 1)
|
||||
{
|
||||
if (this->peer().network().steps() == 0)
|
||||
{
|
||||
this->peer().network().state().increment();
|
||||
this->peer().send_all (Payload (1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void receive (Connection const& c, Message const& m)
|
||||
{
|
||||
if (this->peer().id () != 1)
|
||||
{
|
||||
this->peer().network().state().increment();
|
||||
this->peer().send_all_if (Message (m.id(),
|
||||
m.payload().withHop ()),
|
||||
typename Connection::IsNotPeer (c.peer()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct Params : TestOverlay::ConfigType <
|
||||
Params,
|
||||
TestOverlay::StateBase,
|
||||
PeerLogic
|
||||
>
|
||||
{
|
||||
typedef TestOverlay::PremadeInitPolicy <250, 3> InitPolicy;
|
||||
};
|
||||
|
||||
typedef Params::Network Network;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
struct TestSource : Source
|
||||
{
|
||||
TestSource (beast::String const& name, std::uint32_t start, std::uint32_t end)
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
namespace ripple {
|
||||
namespace Validators {
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
#ifndef RIPPLE_VALIDATORS_VALIDATOR_H_INCLUDED
|
||||
#define RIPPLE_VALIDATORS_VALIDATOR_H_INCLUDED
|
||||
|
||||
#include <ripple/common/seconds_clock.h>
|
||||
#include <ripple/common/seconds_clock.h> // VFALCO Doesn't belong here
|
||||
#include <ripple/validators/impl/Count.h>
|
||||
#include <beast/container/aged_unordered_map.h>
|
||||
#include <beast/container/aged_map.h>
|
||||
#include <beast/container/aged_container_utility.h>
|
||||
|
||||
Reference in New Issue
Block a user