mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Move common parts into ripple_app.h
This commit is contained in:
@@ -4,66 +4,9 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
/** Add this to get the @ref ripple_app module.
|
||||
|
||||
@file ripple_app.cpp
|
||||
@ingroup ripple_app
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
// This must come first to work around the boost placeholders issues
|
||||
#include "beast/modules/beast_core/beast_core.h"
|
||||
|
||||
#if BEAST_LINUX || BEAST_MAC || BEAST_BSD
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
// VFALCO NOTE Holy smokes...that's a lot of boost!!!
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/asio/read_until.hpp>
|
||||
#include <boost/asio/ssl.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
#include <boost/bimap.hpp>
|
||||
#include <boost/bimap/list_of.hpp>
|
||||
#include <boost/bimap/multiset_of.hpp>
|
||||
#include <boost/bimap/unordered_set_of.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/iostreams/concepts.hpp>
|
||||
#include <boost/iostreams/stream.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/mem_fn.hpp>
|
||||
#include <boost/pointer_cast.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/smart_ptr/shared_ptr.hpp>
|
||||
#include <boost/thread/condition_variable.hpp>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/recursive_mutex.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/tuple/tuple_comparison.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
#include "../ripple_core/ripple_core.h"
|
||||
|
||||
#include "beast/modules/beast_db/beast_db.h"
|
||||
#include "beast/modules/beast_sqdb/beast_sqdb.h"
|
||||
#include "beast/modules/beast_sqlite/beast_sqlite.h"
|
||||
#include "ripple_app.h"
|
||||
|
||||
// VFALCO TODO fix these warnings!
|
||||
#ifdef _MSC_VER
|
||||
@@ -74,129 +17,12 @@
|
||||
#pragma warning (disable: 4535) // call requires /EHa
|
||||
#endif
|
||||
|
||||
// VFALCO NOTE these includes generate warnings, unfortunately.
|
||||
#include "ripple_app.h"
|
||||
|
||||
#include "../ripple_data/ripple_data.h"
|
||||
#include "../ripple_mdb/ripple_mdb.h"
|
||||
#include "../ripple_leveldb/ripple_leveldb.h"
|
||||
#include "../ripple_hyperleveldb/ripple_hyperleveldb.h"
|
||||
#include "../ripple_net/ripple_net.h"
|
||||
#include "../modules/ripple_websocket/ripple_websocket.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
// VFALCO NOTE The order of these includes is critical, since they do not
|
||||
// include their own dependencies. This is what allows us to
|
||||
// linearize the include sequence and view it in one place.
|
||||
//
|
||||
|
||||
#include "data/ripple_Database.h"
|
||||
#include "data/ripple_DatabaseCon.h"
|
||||
#include "data/ripple_SqliteDatabase.h"
|
||||
#include "data/ripple_DBInit.h"
|
||||
|
||||
#include "node/ripple_NodeObject.h"
|
||||
#include "node/ripple_NodeStore.h"
|
||||
#include "node/ripple_HyperLevelDBBackendFactory.h"
|
||||
#include "node/ripple_KeyvaDBBackendFactory.h"
|
||||
#include "node/ripple_LevelDBBackendFactory.h"
|
||||
#include "node/ripple_MdbBackendFactory.h"
|
||||
#include "node/ripple_MemoryBackendFactory.h"
|
||||
#include "node/ripple_NullBackendFactory.h"
|
||||
#include "node/ripple_SqliteBackendFactory.h"
|
||||
|
||||
#include "shamap/ripple_SHAMapItem.h"
|
||||
#include "shamap/ripple_SHAMapNode.h"
|
||||
#include "shamap/ripple_SHAMapTreeNode.h"
|
||||
#include "shamap/ripple_SHAMapMissingNode.h"
|
||||
#include "shamap/ripple_SHAMapSyncFilter.h"
|
||||
#include "shamap/ripple_SHAMapAddNode.h"
|
||||
#include "shamap/ripple_SHAMap.h"
|
||||
#include "misc/ripple_SerializedTransaction.h"
|
||||
#include "misc/ripple_SerializedLedger.h"
|
||||
#include "tx/TransactionMeta.h"
|
||||
#include "tx/Transaction.h"
|
||||
#include "misc/ripple_AccountState.h"
|
||||
#include "misc/ripple_NicknameState.h"
|
||||
#include "ledger/Ledger.h"
|
||||
#include "ledger/SerializedValidation.h"
|
||||
#include "main/ripple_LoadManager.h"
|
||||
#include "misc/ripple_ProofOfWork.h"
|
||||
#include "misc/ripple_InfoSub.h"
|
||||
#include "misc/ripple_OrderBook.h"
|
||||
#include "shamap/ripple_SHAMapSyncFilters.h"
|
||||
#include "misc/ripple_IFeatures.h"
|
||||
#include "misc/ripple_IFeeVote.h"
|
||||
#include "misc/ripple_IHashRouter.h"
|
||||
#include "peers/ripple_Peer.h"
|
||||
#include "peers/ripple_Peers.h"
|
||||
#include "misc/ripple_IProofOfWorkFactory.h"
|
||||
#include "peers/ripple_ClusterNodeStatus.h"
|
||||
#include "peers/ripple_UniqueNodeList.h"
|
||||
#include "misc/ripple_IValidations.h"
|
||||
#include "peers/ripple_PeerSet.h"
|
||||
#include "ledger/ripple_InboundLedger.h"
|
||||
#include "ledger/ripple_InboundLedgers.h"
|
||||
#include "misc/ripple_AccountItem.h"
|
||||
#include "misc/ripple_AccountItems.h"
|
||||
#include "ledger/ripple_AcceptedLedgerTx.h"
|
||||
#include "ledger/ripple_AcceptedLedger.h"
|
||||
#include "ledger/ripple_LedgerEntrySet.h"
|
||||
#include "tx/TransactionEngine.h"
|
||||
#include "misc/ripple_CanonicalTXSet.h"
|
||||
#include "ledger/ripple_LedgerHistory.h"
|
||||
#include "ledger/LedgerMaster.h"
|
||||
#include "ledger/LedgerProposal.h"
|
||||
#include "misc/NetworkOPs.h"
|
||||
#include "tx/TransactionMaster.h"
|
||||
#include "main/ripple_LocalCredentials.h"
|
||||
#include "websocket/WSDoor.h"
|
||||
#include "boost/ripple_IoService.h"
|
||||
#include "main/ripple_Application.h"
|
||||
#include "rpc/RPCHandler.h"
|
||||
#include "tx/TransactionQueue.h"
|
||||
#include "ledger/OrderBookDB.h"
|
||||
#include "rpc/CallRPC.h"
|
||||
#include "tx/Transactor.h"
|
||||
#include "tx/ChangeTransactor.h"
|
||||
#include "tx/ripple_TransactionAcquire.h"
|
||||
#include "consensus/ripple_DisputedTx.h"
|
||||
#include "consensus/ripple_LedgerConsensus.h"
|
||||
#include "ledger/LedgerTiming.h"
|
||||
#include "misc/ripple_Offer.h"
|
||||
#include "tx/OfferCancelTransactor.h"
|
||||
#include "tx/OfferCreateTransactor.h"
|
||||
#include "paths/ripple_PathRequest.h"
|
||||
#include "main/ParameterTable.h"
|
||||
#include "paths/ripple_RippleLineCache.h"
|
||||
#include "paths/ripple_PathState.h"
|
||||
#include "paths/ripple_RippleCalc.h"
|
||||
#include "paths/ripple_Pathfinder.h"
|
||||
#include "tx/PaymentTransactor.h"
|
||||
#include "peers/PeerDoor.h"
|
||||
#include "rpc/RPCSub.h"
|
||||
#include "tx/RegularKeySetTransactor.h"
|
||||
#include "paths/ripple_RippleState.h"
|
||||
#include "tx/AccountSetTransactor.h"
|
||||
#include "tx/TrustSetTransactor.h"
|
||||
#include "websocket/WSServerHandler.h"
|
||||
#include "tx/WalletAddTransactor.h"
|
||||
|
||||
#include "contracts/ripple_ScriptData.h"
|
||||
#include "contracts/ripple_Contract.h"
|
||||
#include "contracts/ripple_Interpreter.h"
|
||||
#include "contracts/ripple_Operation.h"
|
||||
|
||||
#include "basics/ripple_RPCServerHandler.h"
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO TODO Move this to an appropriate header
|
||||
namespace boost
|
||||
{
|
||||
@@ -237,18 +63,13 @@ static const uint64 tenTo17m1 = tenTo17 - 1;
|
||||
#if ! defined (RIPPLE_MAIN_PART) || RIPPLE_MAIN_PART == 1
|
||||
|
||||
// The "real" contents of ripple_app.cpp
|
||||
# include "boost/ripple_IoService.h"
|
||||
#include "boost/ripple_IoService.cpp"
|
||||
#include "main/ripple_Application.cpp"
|
||||
|
||||
// Here down is just to split things up for using less build memory
|
||||
#include "node/ripple_NodeObject.cpp"
|
||||
#include "node/ripple_NodeStore.cpp"
|
||||
#include "node/ripple_HyperLevelDBBackendFactory.cpp"
|
||||
#include "node/ripple_KeyvaDBBackendFactory.cpp"
|
||||
#include "node/ripple_LevelDBBackendFactory.cpp"
|
||||
#include "node/ripple_MemoryBackendFactory.cpp"
|
||||
#include "node/ripple_NullBackendFactory.cpp"
|
||||
#include "node/ripple_MdbBackendFactory.cpp"
|
||||
#include "node/ripple_SqliteBackendFactory.cpp"
|
||||
|
||||
#include "ledger/Ledger.cpp"
|
||||
#include "shamap/ripple_SHAMapDelta.cpp"
|
||||
@@ -289,8 +110,6 @@ static const uint64 tenTo17m1 = tenTo17 - 1;
|
||||
#include "data/ripple_SqliteDatabase.cpp"
|
||||
#include "data/ripple_DBInit.cpp"
|
||||
|
||||
#include "boost/ripple_IoService.cpp"
|
||||
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -392,6 +211,16 @@ static const uint64 tenTo17m1 = tenTo17 - 1;
|
||||
|
||||
#if ! defined (RIPPLE_MAIN_PART) || RIPPLE_MAIN_PART == 8
|
||||
|
||||
}
|
||||
|
||||
#include "beast/modules/beast_db/beast_db.h"
|
||||
#include "../ripple_mdb/ripple_mdb.h"
|
||||
#include "../ripple_leveldb/ripple_leveldb.h"
|
||||
#include "../ripple_hyperleveldb/ripple_hyperleveldb.h"
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
#include "consensus/ripple_LedgerConsensus.cpp"
|
||||
#include "ledger/LedgerMaster.cpp"
|
||||
#include "peers/ripple_PeerSet.cpp"
|
||||
@@ -407,8 +236,23 @@ static const uint64 tenTo17m1 = tenTo17 - 1;
|
||||
#include "main/ripple_FatalErrorReporter.h" // private
|
||||
#include "main/ripple_FatalErrorReporter.cpp"
|
||||
#include "main/ripple_RippleMain.h" // private
|
||||
#include "node/ripple_HyperLevelDBBackendFactory.h" // private
|
||||
#include "node/ripple_KeyvaDBBackendFactory.h" // private
|
||||
#include "node/ripple_LevelDBBackendFactory.h" // private
|
||||
#include "node/ripple_MdbBackendFactory.h" // private
|
||||
#include "node/ripple_MemoryBackendFactory.h" // private
|
||||
#include "node/ripple_NullBackendFactory.h" // private
|
||||
#include "node/ripple_SqliteBackendFactory.h" // private
|
||||
#include "main/ripple_RippleMain.cpp"
|
||||
|
||||
#include "node/ripple_HyperLevelDBBackendFactory.cpp"
|
||||
#include "node/ripple_KeyvaDBBackendFactory.cpp"
|
||||
#include "node/ripple_LevelDBBackendFactory.cpp"
|
||||
#include "node/ripple_MemoryBackendFactory.cpp"
|
||||
#include "node/ripple_NullBackendFactory.cpp"
|
||||
#include "node/ripple_MdbBackendFactory.cpp"
|
||||
#include "node/ripple_SqliteBackendFactory.cpp"
|
||||
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -7,6 +7,163 @@
|
||||
#ifndef RIPPLE_APP_H_INCLUDED
|
||||
#define RIPPLE_APP_H_INCLUDED
|
||||
|
||||
#include "modules/ripple_basics/ripple_basics.h"
|
||||
// Must come before <boost/bind.hpp>
|
||||
#include "beast/modules/beast_core/beast_core.h"
|
||||
|
||||
#if BEAST_LINUX || BEAST_MAC || BEAST_BSD
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// VFALCO TODO Reduce these boost dependencies. Make more interfaces
|
||||
// purely abstract and move implementation into .cpp files.
|
||||
//
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/asio/read_until.hpp>
|
||||
#include <boost/asio/ssl.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
#include <boost/bimap.hpp>
|
||||
#include <boost/bimap/list_of.hpp>
|
||||
#include <boost/bimap/multiset_of.hpp>
|
||||
#include <boost/bimap/unordered_set_of.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/iostreams/concepts.hpp>
|
||||
#include <boost/iostreams/stream.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/mem_fn.hpp>
|
||||
#include <boost/pointer_cast.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
#include <boost/ptr_container/ptr_vector.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/smart_ptr/shared_ptr.hpp>
|
||||
#include <boost/thread/condition_variable.hpp>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/recursive_mutex.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/tuple/tuple_comparison.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include "../ripple_core/ripple_core.h"
|
||||
|
||||
#include "../ripple_net/ripple_net.h" // for RPCServerHandler ONLY
|
||||
|
||||
#include "beast/modules/beast_sqdb/beast_sqdb.h"
|
||||
#include "beast/modules/beast_sqlite/beast_sqlite.h"
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
// Order matters here. If you get compile errors,
|
||||
// reorder the include lines until the order is correct.
|
||||
|
||||
#include "data/ripple_Database.h"
|
||||
#include "data/ripple_DatabaseCon.h"
|
||||
#include "data/ripple_SqliteDatabase.h"
|
||||
#include "data/ripple_DBInit.h"
|
||||
|
||||
#include "node/ripple_NodeObject.h"
|
||||
#include "node/ripple_NodeStore.h"
|
||||
|
||||
#include "shamap/ripple_SHAMapItem.h"
|
||||
#include "shamap/ripple_SHAMapNode.h"
|
||||
#include "shamap/ripple_SHAMapTreeNode.h"
|
||||
#include "shamap/ripple_SHAMapMissingNode.h"
|
||||
#include "shamap/ripple_SHAMapSyncFilter.h"
|
||||
#include "shamap/ripple_SHAMapAddNode.h"
|
||||
#include "shamap/ripple_SHAMap.h"
|
||||
#include "misc/ripple_SerializedTransaction.h"
|
||||
#include "misc/ripple_SerializedLedger.h"
|
||||
#include "tx/TransactionMeta.h"
|
||||
#include "tx/Transaction.h"
|
||||
#include "misc/ripple_AccountState.h"
|
||||
#include "misc/ripple_NicknameState.h"
|
||||
#include "ledger/Ledger.h"
|
||||
#include "ledger/SerializedValidation.h"
|
||||
#include "main/ripple_LoadManager.h"
|
||||
#include "misc/ripple_ProofOfWork.h"
|
||||
#include "misc/ripple_InfoSub.h"
|
||||
#include "misc/ripple_OrderBook.h"
|
||||
#include "shamap/ripple_SHAMapSyncFilters.h"
|
||||
#include "misc/ripple_IFeatures.h"
|
||||
#include "misc/ripple_IFeeVote.h"
|
||||
#include "misc/ripple_IHashRouter.h"
|
||||
#include "peers/ripple_Peer.h"
|
||||
#include "peers/ripple_Peers.h"
|
||||
#include "misc/ripple_IProofOfWorkFactory.h"
|
||||
#include "peers/ripple_ClusterNodeStatus.h"
|
||||
#include "peers/ripple_UniqueNodeList.h"
|
||||
#include "misc/ripple_IValidations.h"
|
||||
#include "peers/ripple_PeerSet.h"
|
||||
#include "ledger/ripple_InboundLedger.h"
|
||||
#include "ledger/ripple_InboundLedgers.h"
|
||||
#include "misc/ripple_AccountItem.h"
|
||||
#include "misc/ripple_AccountItems.h"
|
||||
#include "ledger/ripple_AcceptedLedgerTx.h"
|
||||
#include "ledger/ripple_AcceptedLedger.h"
|
||||
#include "ledger/ripple_LedgerEntrySet.h"
|
||||
#include "tx/TransactionEngine.h"
|
||||
#include "misc/ripple_CanonicalTXSet.h"
|
||||
#include "ledger/ripple_LedgerHistory.h"
|
||||
#include "ledger/LedgerMaster.h"
|
||||
#include "ledger/LedgerProposal.h"
|
||||
#include "misc/NetworkOPs.h"
|
||||
#include "tx/TransactionMaster.h"
|
||||
#include "main/ripple_LocalCredentials.h"
|
||||
#include "websocket/WSDoor.h"
|
||||
#include "main/ripple_Application.h"
|
||||
#include "rpc/RPCHandler.h"
|
||||
#include "tx/TransactionQueue.h"
|
||||
#include "ledger/OrderBookDB.h"
|
||||
#include "rpc/CallRPC.h"
|
||||
#include "tx/Transactor.h"
|
||||
#include "tx/ChangeTransactor.h"
|
||||
#include "tx/ripple_TransactionAcquire.h"
|
||||
#include "consensus/ripple_DisputedTx.h"
|
||||
#include "consensus/ripple_LedgerConsensus.h"
|
||||
#include "ledger/LedgerTiming.h"
|
||||
#include "misc/ripple_Offer.h"
|
||||
#include "tx/OfferCancelTransactor.h"
|
||||
#include "tx/OfferCreateTransactor.h"
|
||||
#include "paths/ripple_PathRequest.h"
|
||||
#include "main/ParameterTable.h"
|
||||
#include "paths/ripple_RippleLineCache.h"
|
||||
#include "paths/ripple_PathState.h"
|
||||
#include "paths/ripple_RippleCalc.h"
|
||||
#include "paths/ripple_Pathfinder.h"
|
||||
#include "tx/PaymentTransactor.h"
|
||||
#include "peers/PeerDoor.h"
|
||||
#include "rpc/RPCSub.h"
|
||||
#include "tx/RegularKeySetTransactor.h"
|
||||
#include "paths/ripple_RippleState.h"
|
||||
#include "tx/AccountSetTransactor.h"
|
||||
#include "tx/TrustSetTransactor.h"
|
||||
#include "websocket/WSServerHandler.h"
|
||||
#include "tx/WalletAddTransactor.h"
|
||||
|
||||
#include "contracts/ripple_ScriptData.h"
|
||||
#include "contracts/ripple_Contract.h"
|
||||
#include "contracts/ripple_Interpreter.h"
|
||||
#include "contracts/ripple_Operation.h"
|
||||
|
||||
// Move this to the .cpp and remove the include for ripple_net.h
|
||||
#include "basics/ripple_RPCServerHandler.h"
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user