Allow LevelDB and SQLite to co-exist in the build and have the backing

store for hashed nodes selectable in the config.
This commit is contained in:
JoelKatz
2013-05-07 15:04:23 -07:00
parent a417640c9d
commit e086fa5a5d
10 changed files with 131 additions and 59 deletions

View File

@@ -79,12 +79,10 @@ class Application
FeeVote mFeeVote;
FeatureTable mFeatureTable;
DatabaseCon *mRpcDB, *mTxnDB, *mLedgerDB, *mWalletDB, *mNetNodeDB, *mPathFindDB;
DatabaseCon *mRpcDB, *mTxnDB, *mLedgerDB, *mWalletDB, *mNetNodeDB, *mPathFindDB, *mHashNodeDB;
#ifdef USE_LEVELDB
leveldb::DB *mHashNodeDB;
#else
DatabaseCon *mHashNodeDB;
leveldb::DB *mHashNodeLDB;
#endif
ConnectionPool mConnectionPool;
@@ -154,11 +152,10 @@ public:
DatabaseCon* getWalletDB() { return mWalletDB; }
DatabaseCon* getNetNodeDB() { return mNetNodeDB; }
DatabaseCon* getPathFindDB() { return mPathFindDB; }
DatabaseCon* getHashNodeDB() { return mHashNodeDB; }
#ifdef USE_LEVELDB
leveldb::DB* getHashNodeDB() { return mHashNodeDB; }
#else
DatabaseCon* getHashNodeDB() { return mHashNodeDB; }
leveldb::DB* getHashNodeLDB() { return mHashNodeLDB; }
#endif
uint256 getNonce256() { return mNonce256; }