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

@@ -126,6 +126,8 @@
</ClCompile> </ClCompile>
<ClInclude Include="..\..\build\proto\ripple.pb.h"> <ClInclude Include="..\..\build\proto\ripple.pb.h">
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\BeastConfig.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\Arithmetic.h"> <ClInclude Include="..\..\src\beast\beast\Arithmetic.h">
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\beast\beast\asio\abstract_socket.cpp"> <ClCompile Include="..\..\src\beast\beast\asio\abstract_socket.cpp">
@@ -302,14 +304,14 @@
<ClCompile Include="..\..\src\beast\beast\crypto\impl\MurmurHash.cpp"> <ClCompile Include="..\..\src\beast\beast\crypto\impl\MurmurHash.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild> <ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\beast\beast\crypto\impl\Sha256.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\beast\beast\crypto\impl\sha2\sha2.c"> <ClCompile Include="..\..\src\beast\beast\crypto\impl\sha2\sha2.c">
<ExcludedFromBuild>True</ExcludedFromBuild> <ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClInclude Include="..\..\src\beast\beast\crypto\impl\sha2\sha2.h"> <ClInclude Include="..\..\src\beast\beast\crypto\impl\sha2\sha2.h">
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\beast\beast\crypto\impl\Sha256.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\beast\beast\crypto\impl\UnsignedInteger.cpp"> <ClCompile Include="..\..\src\beast\beast\crypto\impl\UnsignedInteger.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild> <ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile> </ClCompile>
@@ -823,6 +825,14 @@
</ClCompile> </ClCompile>
<ClInclude Include="..\..\src\beast\beast\module\core\text\StringPairArray.h"> <ClInclude Include="..\..\src\beast\beast\module\core\text\StringPairArray.h">
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\CriticalSection.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\DynamicLibrary.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\Process.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\ScopedLock.h">
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\module\core\thread\DeadlineTimer.cpp"> <ClCompile Include="..\..\src\beast\beast\module\core\thread\DeadlineTimer.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild> <ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile> </ClCompile>
@@ -835,14 +845,6 @@
</ClCompile> </ClCompile>
<ClInclude Include="..\..\src\beast\beast\module\core\thread\Workers.h"> <ClInclude Include="..\..\src\beast\beast\module\core\thread\Workers.h">
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\CriticalSection.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\DynamicLibrary.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\Process.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\ScopedLock.h">
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\module\core\time\AtExitHook.cpp"> <ClCompile Include="..\..\src\beast\beast\module\core\time\AtExitHook.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild> <ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile> </ClCompile>
@@ -1185,8 +1187,6 @@
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\beast\beast\Version.h"> <ClInclude Include="..\..\src\beast\beast\Version.h">
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\BeastConfig.h">
</ClInclude>
<ClCompile Include="..\..\src\hyperleveldb\db\builder.cc"> <ClCompile Include="..\..\src\hyperleveldb\db\builder.cc">
<ExcludedFromBuild>True</ExcludedFromBuild> <ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile> </ClCompile>
@@ -3515,18 +3515,10 @@
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ripple\unity\validators.cpp"> <ClCompile Include="..\..\src\ripple\unity\validators.cpp">
</ClCompile> </ClCompile>
<ClInclude Include="..\..\src\ripple\unity\validators.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\unity\websocket.cpp"> <ClCompile Include="..\..\src\ripple\unity\websocket.cpp">
</ClCompile> </ClCompile>
<ClInclude Include="..\..\src\ripple\unity\websocket.h"> <ClInclude Include="..\..\src\ripple\unity\websocket.h">
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\ripple\validators\api\Manager.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\api\Source.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\api\Types.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\impl\ChosenList.h"> <ClInclude Include="..\..\src\ripple\validators\impl\ChosenList.h">
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\ripple\validators\impl\Count.h"> <ClInclude Include="..\..\src\ripple\validators\impl\Count.h">
@@ -3577,6 +3569,12 @@
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\ripple\validators\impl\Validator.h"> <ClInclude Include="..\..\src\ripple\validators\impl\Validator.h">
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\ripple\validators\Manager.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\Source.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\Types.h">
</ClInclude>
<ClCompile Include="..\..\src\rocksdb\db\builder.cc"> <ClCompile Include="..\..\src\rocksdb\db\builder.cc">
<ExcludedFromBuild>True</ExcludedFromBuild> <ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile> </ClCompile>

View File

@@ -538,9 +538,6 @@
<Filter Include="ripple\validators"> <Filter Include="ripple\validators">
<UniqueIdentifier>{B23DCD4C-1622-2C31-4562-87F2F95D3884}</UniqueIdentifier> <UniqueIdentifier>{B23DCD4C-1622-2C31-4562-87F2F95D3884}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="ripple\validators\api">
<UniqueIdentifier>{C6115F8D-9E7F-833E-F8A9-D8FA61356CE7}</UniqueIdentifier>
</Filter>
<Filter Include="ripple\validators\impl"> <Filter Include="ripple\validators\impl">
<UniqueIdentifier>{3D1F0CBE-9B69-D29E-EAAE-E5A1204068BC}</UniqueIdentifier> <UniqueIdentifier>{3D1F0CBE-9B69-D29E-EAAE-E5A1204068BC}</UniqueIdentifier>
</Filter> </Filter>
@@ -663,6 +660,9 @@
<ClInclude Include="..\..\build\proto\ripple.pb.h"> <ClInclude Include="..\..\build\proto\ripple.pb.h">
<Filter>build\proto</Filter> <Filter>build\proto</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\BeastConfig.h">
<Filter>.</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\Arithmetic.h"> <ClInclude Include="..\..\src\beast\beast\Arithmetic.h">
<Filter>beast</Filter> <Filter>beast</Filter>
</ClInclude> </ClInclude>
@@ -894,15 +894,15 @@
<ClCompile Include="..\..\src\beast\beast\crypto\impl\MurmurHash.cpp"> <ClCompile Include="..\..\src\beast\beast\crypto\impl\MurmurHash.cpp">
<Filter>beast\crypto\impl</Filter> <Filter>beast\crypto\impl</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\beast\beast\crypto\impl\Sha256.cpp">
<Filter>beast\crypto\impl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\beast\beast\crypto\impl\sha2\sha2.c"> <ClCompile Include="..\..\src\beast\beast\crypto\impl\sha2\sha2.c">
<Filter>beast\crypto\impl\sha2</Filter> <Filter>beast\crypto\impl\sha2</Filter>
</ClCompile> </ClCompile>
<ClInclude Include="..\..\src\beast\beast\crypto\impl\sha2\sha2.h"> <ClInclude Include="..\..\src\beast\beast\crypto\impl\sha2\sha2.h">
<Filter>beast\crypto\impl\sha2</Filter> <Filter>beast\crypto\impl\sha2</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\beast\beast\crypto\impl\Sha256.cpp">
<Filter>beast\crypto\impl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\beast\beast\crypto\impl\UnsignedInteger.cpp"> <ClCompile Include="..\..\src\beast\beast\crypto\impl\UnsignedInteger.cpp">
<Filter>beast\crypto\impl</Filter> <Filter>beast\crypto\impl</Filter>
</ClCompile> </ClCompile>
@@ -1545,6 +1545,18 @@
<ClInclude Include="..\..\src\beast\beast\module\core\text\StringPairArray.h"> <ClInclude Include="..\..\src\beast\beast\module\core\text\StringPairArray.h">
<Filter>beast\module\core\text</Filter> <Filter>beast\module\core\text</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\CriticalSection.h">
<Filter>beast\module\core\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\DynamicLibrary.h">
<Filter>beast\module\core\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\Process.h">
<Filter>beast\module\core\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\ScopedLock.h">
<Filter>beast\module\core\threads</Filter>
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\module\core\thread\DeadlineTimer.cpp"> <ClCompile Include="..\..\src\beast\beast\module\core\thread\DeadlineTimer.cpp">
<Filter>beast\module\core\thread</Filter> <Filter>beast\module\core\thread</Filter>
</ClCompile> </ClCompile>
@@ -1560,18 +1572,6 @@
<ClInclude Include="..\..\src\beast\beast\module\core\thread\Workers.h"> <ClInclude Include="..\..\src\beast\beast\module\core\thread\Workers.h">
<Filter>beast\module\core\thread</Filter> <Filter>beast\module\core\thread</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\CriticalSection.h">
<Filter>beast\module\core\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\DynamicLibrary.h">
<Filter>beast\module\core\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\Process.h">
<Filter>beast\module\core\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\module\core\threads\ScopedLock.h">
<Filter>beast\module\core\threads</Filter>
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\module\core\time\AtExitHook.cpp"> <ClCompile Include="..\..\src\beast\beast\module\core\time\AtExitHook.cpp">
<Filter>beast\module\core\time</Filter> <Filter>beast\module\core\time</Filter>
</ClCompile> </ClCompile>
@@ -2010,9 +2010,6 @@
<ClInclude Include="..\..\src\beast\beast\Version.h"> <ClInclude Include="..\..\src\beast\beast\Version.h">
<Filter>beast</Filter> <Filter>beast</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\BeastConfig.h">
<Filter>.</Filter>
</ClInclude>
<ClCompile Include="..\..\src\hyperleveldb\db\builder.cc"> <ClCompile Include="..\..\src\hyperleveldb\db\builder.cc">
<Filter>hyperleveldb\db</Filter> <Filter>hyperleveldb\db</Filter>
</ClCompile> </ClCompile>
@@ -4863,24 +4860,12 @@
<ClCompile Include="..\..\src\ripple\unity\validators.cpp"> <ClCompile Include="..\..\src\ripple\unity\validators.cpp">
<Filter>ripple\unity</Filter> <Filter>ripple\unity</Filter>
</ClCompile> </ClCompile>
<ClInclude Include="..\..\src\ripple\unity\validators.h">
<Filter>ripple\unity</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\unity\websocket.cpp"> <ClCompile Include="..\..\src\ripple\unity\websocket.cpp">
<Filter>ripple\unity</Filter> <Filter>ripple\unity</Filter>
</ClCompile> </ClCompile>
<ClInclude Include="..\..\src\ripple\unity\websocket.h"> <ClInclude Include="..\..\src\ripple\unity\websocket.h">
<Filter>ripple\unity</Filter> <Filter>ripple\unity</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\ripple\validators\api\Manager.h">
<Filter>ripple\validators\api</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\api\Source.h">
<Filter>ripple\validators\api</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\api\Types.h">
<Filter>ripple\validators\api</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\impl\ChosenList.h"> <ClInclude Include="..\..\src\ripple\validators\impl\ChosenList.h">
<Filter>ripple\validators\impl</Filter> <Filter>ripple\validators\impl</Filter>
</ClInclude> </ClInclude>
@@ -4944,6 +4929,15 @@
<ClInclude Include="..\..\src\ripple\validators\impl\Validator.h"> <ClInclude Include="..\..\src\ripple\validators\impl\Validator.h">
<Filter>ripple\validators\impl</Filter> <Filter>ripple\validators\impl</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\src\ripple\validators\Manager.h">
<Filter>ripple\validators</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\Source.h">
<Filter>ripple\validators</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\validators\Types.h">
<Filter>ripple\validators</Filter>
</ClInclude>
<ClCompile Include="..\..\src\rocksdb\db\builder.cc"> <ClCompile Include="..\..\src\rocksdb\db\builder.cc">
<Filter>rocksdb\db</Filter> <Filter>rocksdb\db</Filter>
</ClCompile> </ClCompile>

View File

@@ -18,6 +18,7 @@
//============================================================================== //==============================================================================
#include <ripple/basics/containers/RangeSet.h> #include <ripple/basics/containers/RangeSet.h>
#include <ripple/validators/Manager.h>
#include <cassert> #include <cassert>
namespace ripple { namespace ripple {

View File

@@ -29,6 +29,7 @@
#include <ripple/nodestore/DummyScheduler.h> #include <ripple/nodestore/DummyScheduler.h>
#include <ripple/nodestore/Manager.h> #include <ripple/nodestore/Manager.h>
#include <ripple/overlay/make_Overlay.h> #include <ripple/overlay/make_Overlay.h>
#include <ripple/validators/Manager.h>
#include <fstream> #include <fstream>
namespace ripple { namespace ripple {

View File

@@ -30,8 +30,8 @@
#include <ripple/module/app/misc/ProofOfWork.h> #include <ripple/module/app/misc/ProofOfWork.h>
#include <ripple/module/app/misc/ProofOfWorkFactory.h> #include <ripple/module/app/misc/ProofOfWorkFactory.h>
#include <ripple/module/data/protocol/Protocol.h> #include <ripple/module/data/protocol/Protocol.h>
#include <ripple/unity/validators.h>
#include <ripple/unity/peerfinder.h> #include <ripple/unity/peerfinder.h>
#include <ripple/validators/Manager.h>
// VFALCO This is unfortunate. Comment this out and // VFALCO This is unfortunate. Comment this out and
// just include what is needed. // just include what is needed.

View File

@@ -91,7 +91,7 @@ public:
template <class UnsignedIntegralType> template <class UnsignedIntegralType>
static value_type createFromInteger (UnsignedIntegralType i) static value_type createFromInteger (UnsignedIntegralType i)
{ {
static_bassert (size >= sizeof (UnsignedIntegralType)); static_assert (size >= sizeof (UnsignedIntegralType), "");
std::array <std::uint8_t, size> data; std::array <std::uint8_t, size> data;
data.fill (0); data.fill (0);
i = beast::toNetworkByteOrder <UnsignedIntegralType> (i); i = beast::toNetworkByteOrder <UnsignedIntegralType> (i);

View File

@@ -20,6 +20,8 @@
#ifndef RIPPLE_TYPES_RIPPLELEDGERHASH_H_INCLUDED #ifndef RIPPLE_TYPES_RIPPLELEDGERHASH_H_INCLUDED
#define RIPPLE_TYPES_RIPPLELEDGERHASH_H_INCLUDED #define RIPPLE_TYPES_RIPPLELEDGERHASH_H_INCLUDED
#include <ripple/types/api/SimpleIdentifier.h>
namespace ripple { namespace ripple {
/* /*

View File

@@ -20,6 +20,8 @@
#ifndef RIPPLE_TYPES_SIMPLEIDENTIFIER_H_INCLUDED #ifndef RIPPLE_TYPES_SIMPLEIDENTIFIER_H_INCLUDED
#define RIPPLE_TYPES_SIMPLEIDENTIFIER_H_INCLUDED #define RIPPLE_TYPES_SIMPLEIDENTIFIER_H_INCLUDED
#include <ripple/types/api/base_uint.h>
namespace ripple { namespace ripple {
/** Provides common traits for non-signing identifiers like ledger hashes. /** Provides common traits for non-signing identifiers like ledger hashes.

View File

@@ -25,7 +25,6 @@
#include <ripple/unity/websocket.h> #include <ripple/unity/websocket.h>
#include <ripple/unity/resource.h> #include <ripple/unity/resource.h>
#include <ripple/unity/sitefiles.h> #include <ripple/unity/sitefiles.h>
#include <ripple/unity/validators.h>
#include <ripple/http/Server.h> #include <ripple/http/Server.h>

View File

@@ -25,8 +25,6 @@
#include <ripple/unity/app.h> #include <ripple/unity/app.h>
#include <ripple/unity/validators.h>
#include <ripple/module/app/misc/PowResult.h> #include <ripple/module/app/misc/PowResult.h>
#include <ripple/module/app/misc/ProofOfWorkFactory.h> #include <ripple/module/app/misc/ProofOfWorkFactory.h>

View File

@@ -26,7 +26,6 @@
#include <ripple/common/seconds_clock.h> #include <ripple/common/seconds_clock.h>
#include <ripple/unity/peerfinder.h> #include <ripple/unity/peerfinder.h>
#include <ripple/unity/resource.h> #include <ripple/unity/resource.h>
#include <ripple/unity/validators.h>
#include <ripple/common/RippleSSLContext.h> #include <ripple/common/RippleSSLContext.h>
#include <deque> #include <deque>

View File

@@ -19,6 +19,7 @@
#include <BeastConfig.h> #include <BeastConfig.h>
#if 0
#include <ripple/unity/validators.h> #include <ripple/unity/validators.h>
#include <boost/regex.hpp> #include <boost/regex.hpp>
@@ -47,6 +48,7 @@
#include <ripple/validators/impl/Validation.h> #include <ripple/validators/impl/Validation.h>
#include <ripple/validators/impl/Validator.h> #include <ripple/validators/impl/Validator.h>
#include <ripple/validators/impl/Logic.h> #include <ripple/validators/impl/Logic.h>
#endif
#include <ripple/validators/impl/Manager.cpp> #include <ripple/validators/impl/Manager.cpp>
#include <ripple/validators/impl/Source.cpp> #include <ripple/validators/impl/Source.cpp>
@@ -56,3 +58,5 @@
#include <ripple/validators/impl/StoreSqdb.cpp> #include <ripple/validators/impl/StoreSqdb.cpp>
#include <ripple/validators/impl/Tests.cpp> #include <ripple/validators/impl/Tests.cpp>
#include <ripple/validators/impl/Utilities.cpp> #include <ripple/validators/impl/Utilities.cpp>
//#include <ripple/validators/tests/validator.test.cpp>

View File

@@ -1,31 +0,0 @@
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#ifndef RIPPLE_VALIDATORS_H_INCLUDED
#define RIPPLE_VALIDATORS_H_INCLUDED
#include <beast/http/URL.h>
#include <ripple/unity/types.h>
#include <ripple/validators/api/Types.h>
#include <ripple/validators/api/Source.h>
#include <ripple/validators/api/Manager.h>
#endif

View File

@@ -20,8 +20,12 @@
#ifndef RIPPLE_VALIDATORS_MANAGER_H_INCLUDED #ifndef RIPPLE_VALIDATORS_MANAGER_H_INCLUDED
#define RIPPLE_VALIDATORS_MANAGER_H_INCLUDED #define RIPPLE_VALIDATORS_MANAGER_H_INCLUDED
#include <ripple/validators/Source.h>
#include <ripple/validators/Types.h>
#include <beast/threads/Stoppable.h> #include <beast/threads/Stoppable.h>
#include <beast/http/URL.h>
#include <beast/module/core/files/File.h> #include <beast/module/core/files/File.h>
#include <beast/utility/PropertyStream.h>
namespace ripple { namespace ripple {
namespace Validators { namespace Validators {

View File

@@ -20,8 +20,10 @@
#ifndef RIPPLE_VALIDATORS_SOURCE_H_INCLUDED #ifndef RIPPLE_VALIDATORS_SOURCE_H_INCLUDED
#define RIPPLE_VALIDATORS_SOURCE_H_INCLUDED #define RIPPLE_VALIDATORS_SOURCE_H_INCLUDED
#include <ripple/types/api/RipplePublicKey.h>
#include <beast/smart_ptr/SharedObject.h> #include <beast/smart_ptr/SharedObject.h>
#include <beast/module/core/time/Time.h> #include <beast/module/core/time/Time.h>
#include <beast/utility/Journal.h>
namespace ripple { namespace ripple {
namespace Validators { namespace Validators {

View File

@@ -1 +0,0 @@
# Validators TODO

View File

@@ -20,6 +20,8 @@
#ifndef RIPPLE_VALIDATORS_TYPES_H_INCLUDED #ifndef RIPPLE_VALIDATORS_TYPES_H_INCLUDED
#define RIPPLE_VALIDATORS_TYPES_H_INCLUDED #define RIPPLE_VALIDATORS_TYPES_H_INCLUDED
#include <ripple/types/api/RippleLedgerHash.h>
namespace ripple { namespace ripple {
namespace Validators { namespace Validators {

View File

@@ -21,6 +21,7 @@
#define RIPPLE_VALIDATORS_CHOSENLIST_H_INCLUDED #define RIPPLE_VALIDATORS_CHOSENLIST_H_INCLUDED
#include <ripple/common/UnorderedContainers.h> #include <ripple/common/UnorderedContainers.h>
#include <ripple/types/api/RipplePublicKeyHash.h>
namespace ripple { namespace ripple {
namespace Validators { namespace Validators {

View File

@@ -20,8 +20,14 @@
#ifndef RIPPLE_VALIDATORS_LOGIC_H_INCLUDED #ifndef RIPPLE_VALIDATORS_LOGIC_H_INCLUDED
#define 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/chrono/manual_clock.h>
#include <beast/container/aged_unordered_set.h> #include <beast/container/aged_unordered_set.h>
#include <beast/smart_ptr/SharedPtr.h>
#include <memory> #include <memory>
namespace ripple { 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) /** ChosenValidators (formerly known as UNL)
Motivation: Motivation:

View File

@@ -20,6 +20,8 @@
#ifndef RIPPLE_VALIDATORS_SOURCEDESC_H_INCLUDED #ifndef RIPPLE_VALIDATORS_SOURCEDESC_H_INCLUDED
#define RIPPLE_VALIDATORS_SOURCEDESC_H_INCLUDED #define RIPPLE_VALIDATORS_SOURCEDESC_H_INCLUDED
#include <beast/smart_ptr/SharedPtr.h>
namespace ripple { namespace ripple {
namespace Validators { namespace Validators {

View File

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

View File

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

View File

@@ -20,6 +20,8 @@
#ifndef RIPPLE_VALIDATORS_STORE_H_INCLUDED #ifndef RIPPLE_VALIDATORS_STORE_H_INCLUDED
#define RIPPLE_VALIDATORS_STORE_H_INCLUDED #define RIPPLE_VALIDATORS_STORE_H_INCLUDED
#include <ripple/validators/impl/SourceDesc.h>
namespace ripple { namespace ripple {
namespace Validators { namespace Validators {

View File

@@ -20,6 +20,10 @@
#ifndef RIPPLE_VALIDATORS_STORESQDB_H_INCLUDED #ifndef RIPPLE_VALIDATORS_STORESQDB_H_INCLUDED
#define 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 ripple {
namespace Validators { 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 struct TestSource : Source
{ {
TestSource (beast::String const& name, std::uint32_t start, std::uint32_t end) 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 ripple {
namespace Validators { namespace Validators {

View File

@@ -20,7 +20,8 @@
#ifndef RIPPLE_VALIDATORS_VALIDATOR_H_INCLUDED #ifndef RIPPLE_VALIDATORS_VALIDATOR_H_INCLUDED
#define 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_unordered_map.h>
#include <beast/container/aged_map.h> #include <beast/container/aged_map.h>
#include <beast/container/aged_container_utility.h> #include <beast/container/aged_container_utility.h>