Tidy up sources

This commit is contained in:
Vinnie Falco
2014-08-14 14:16:34 -07:00
parent 019c1af435
commit 2e3784a914
28 changed files with 100 additions and 157 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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:

View File

@@ -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 {

View File

@@ -17,6 +17,9 @@
*/
//==============================================================================
#include <ripple/validators/impl/Utilities.h>
#include <beast/module/core/files/RandomAccessFile.h>
namespace ripple {
namespace Validators {

View File

@@ -17,6 +17,7 @@
*/
//==============================================================================
#include <beast/module/asio/asio.h>
#include <memory>
namespace ripple {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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)

View File

@@ -17,6 +17,8 @@
*/
//==============================================================================
#include <boost/regex.hpp>
namespace ripple {
namespace Validators {

View File

@@ -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>