Move RPC data_* commands data to db/rpc.db.

This commit is contained in:
Arthur Britto
2012-06-26 03:39:15 -07:00
parent 4306be296a
commit 0bcbb5bd75
4 changed files with 37 additions and 27 deletions

View File

@@ -117,9 +117,9 @@ bool Wallet::nodeIdentityCreate() {
bool Wallet::dataDelete(const std::string& strKey)
{
Database* db = theApp->getWalletDB()->getDB();
Database* db = theApp->getRpcDB()->getDB();
ScopedLock sl(theApp->getWalletDB()->getDBLock());
ScopedLock sl(theApp->getRpcDB()->getDBLock());
return db->executeSQL(str(boost::format("DELETE FROM RPCData WHERE Key=%s;")
% db->escape(strKey)));
@@ -127,9 +127,9 @@ bool Wallet::dataDelete(const std::string& strKey)
bool Wallet::dataFetch(const std::string& strKey, std::string& strValue)
{
Database* db = theApp->getWalletDB()->getDB();
Database* db = theApp->getRpcDB()->getDB();
ScopedLock sl(theApp->getWalletDB()->getDBLock());
ScopedLock sl(theApp->getRpcDB()->getDBLock());
bool bSuccess = false;
@@ -151,9 +151,9 @@ bool Wallet::dataFetch(const std::string& strKey, std::string& strValue)
bool Wallet::dataStore(const std::string& strKey, const std::string& strValue)
{
Database* db = theApp->getWalletDB()->getDB();
Database* db = theApp->getRpcDB()->getDB();
ScopedLock sl(theApp->getWalletDB()->getDBLock());
ScopedLock sl(theApp->getRpcDB()->getDBLock());
bool bSuccess = false;