mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove dead code, fix import.
This commit is contained in:
@@ -13,37 +13,11 @@ NodeStore::NodeStore (String backendParameters, String fastBackendParameters, in
|
||||
, mWriteGeneration (0)
|
||||
, mWriteLoad (0)
|
||||
, mWritePending (false)
|
||||
, mLevelDB (false)
|
||||
, mEphemeralDB (false)
|
||||
{
|
||||
if (fastBackendParameters.isNotEmpty ())
|
||||
m_fastBackend = createBackend (fastBackendParameters);
|
||||
|
||||
mWriteSet.reserve (128);
|
||||
|
||||
// VFALCO TODO Eliminate usage of theConfig
|
||||
// This can be done by passing required parameters through
|
||||
// the backendParameters string.
|
||||
//
|
||||
if (theConfig.NODE_DB == "leveldb" || theConfig.NODE_DB == "LevelDB")
|
||||
{
|
||||
mLevelDB = true;
|
||||
}
|
||||
else if (theConfig.NODE_DB == "SQLite" || theConfig.NODE_DB == "sqlite")
|
||||
{
|
||||
mLevelDB = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteLog (lsFATAL, NodeObject) << "Incorrect database selection";
|
||||
assert (false);
|
||||
}
|
||||
|
||||
if (!theConfig.LDB_EPHEMERAL.empty ())
|
||||
{
|
||||
// VFALCO NOTE This is cryptic
|
||||
mEphemeralDB = true;
|
||||
}
|
||||
}
|
||||
|
||||
void NodeStore::addBackendFactory (BackendFactory& factory)
|
||||
@@ -51,12 +25,6 @@ void NodeStore::addBackendFactory (BackendFactory& factory)
|
||||
s_factories.add (&factory);
|
||||
}
|
||||
|
||||
// DEPRECATED
|
||||
bool NodeStore::isLevelDB ()
|
||||
{
|
||||
return mLevelDB;
|
||||
}
|
||||
|
||||
float NodeStore::getCacheHitRate ()
|
||||
{
|
||||
return mCache.getHitRate ();
|
||||
@@ -121,7 +89,6 @@ bool NodeStore::store (NodeObjectType type, uint32 index,
|
||||
|
||||
void NodeStore::bulkWrite (Job&)
|
||||
{
|
||||
assert (mLevelDB);
|
||||
int setSize = 0;
|
||||
|
||||
while (1)
|
||||
|
||||
@@ -83,8 +83,6 @@ public:
|
||||
*/
|
||||
static void addBackendFactory (BackendFactory& factory);
|
||||
|
||||
bool isLevelDB ();
|
||||
|
||||
float getCacheHitRate ();
|
||||
|
||||
bool store (NodeObjectType type, uint32 index, Blob const& data,
|
||||
@@ -121,8 +119,6 @@ private:
|
||||
|
||||
std::vector< boost::shared_ptr<NodeObject> > mWriteSet;
|
||||
bool mWritePending;
|
||||
bool mLevelDB;
|
||||
bool mEphemeralDB;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -85,8 +85,8 @@ public:
|
||||
boost::filesystem::path DEBUG_LOGFILE;
|
||||
boost::filesystem::path VALIDATORS_FILE; // As specifed in rippled.cfg.
|
||||
std::string NODE_DB; // Database to use for nodes
|
||||
std::string LDB_EPHEMERAL; // Database for temporary storage
|
||||
bool LDB_IMPORT; // Import into LevelDB
|
||||
std::string FASTNODE_DB; // Database for temporary storage
|
||||
std::string DB_IMPORT; // Import from old DB
|
||||
bool ELB_SUPPORT; // Support Amazon ELB
|
||||
|
||||
std::string VALIDATORS_SITE; // Where to find validators.txt on the Internet.
|
||||
|
||||
Reference in New Issue
Block a user