Tie application code to master ledger code.

This commit is contained in:
JoelKatz
2011-12-13 12:16:17 -08:00
parent d8f608abff
commit 91f0443e29

View File

@@ -7,7 +7,9 @@
#include "TimingService.h" #include "TimingService.h"
#include "PubKeyCache.h" #include "PubKeyCache.h"
#include "ScopedLock.h" #include "ScopedLock.h"
#include "LedgerMaster.h"
#include "Wallet.h" #include "Wallet.h"
#include "Peer.h"
#include "database/database.h" #include "database/database.h"
#include <boost/asio.hpp> #include <boost/asio.hpp>
@@ -15,7 +17,6 @@
class RPCDoor; class RPCDoor;
class PeerDoor; class PeerDoor;
class Application class Application
{ {
TimingService mTimingService; TimingService mTimingService;
@@ -23,14 +24,17 @@ class Application
KnownNodeList mKnownNodes; KnownNodeList mKnownNodes;
Wallet mWallet; Wallet mWallet;
PubKeyCache mPKCache; PubKeyCache mPKCache;
LedgerMaster mMasterLedger;
Database* mDatabase; Database* mDatabase;
ConnectionPool mConnectionPool; ConnectionPool mConnectionPool;
PeerDoor* mPeerDoor; PeerDoor* mPeerDoor;
RPCDoor* mRPCDoor; RPCDoor* mRPCDoor;
//Serializer* mSerializer; //Serializer* mSerializer;
std::map<std::string, Peer::pointer> mPeerMap;
boost::recursive_mutex mPeerMapLock;
boost::asio::io_service mIOService; boost::asio::io_service mIOService;
boost::recursive_mutex dbLock; boost::recursive_mutex dbLock;
@@ -43,6 +47,7 @@ public:
Wallet& getWallet() { return(mWallet); } Wallet& getWallet() { return(mWallet); }
PubKeyCache& getPubKeyCache() { return mPKCache; } PubKeyCache& getPubKeyCache() { return mPKCache; }
Database* getDB() { return(mDatabase); } Database* getDB() { return(mDatabase); }
LedgerMaster& getMasterLedger() { return mMasterLedger; }
ScopedLock getDBLock() { return ScopedLock(dbLock); } ScopedLock getDBLock() { return ScopedLock(dbLock); }
void setDB(Database* db) { mDatabase=db; } void setDB(Database* db) { mDatabase=db; }