Fix some database issues.

This commit is contained in:
JoelKatz
2012-01-01 07:45:13 -08:00
parent d4a79d7c7f
commit a24e7a4c27
7 changed files with 75 additions and 70 deletions

View File

@@ -53,7 +53,7 @@ CKey::pointer PubKeyCache::store(const uint160& id, CKey::pointer key)
if(!pit.second) // there was an existing key
return pit.first->second;
}
std::string sql="INSERT INTO PubKeys (ID, PubKey) VALUES ('";
std::string sql="INSERT INTO PubKeys (ID,PubKey) VALUES ('";
sql+=id.GetHex();
sql+="',";
@@ -63,7 +63,7 @@ CKey::pointer PubKeyCache::store(const uint160& id, CKey::pointer key)
sql+=encodedPK;
sql.append(");");
ScopedLock dbl(theApp->getTxnDB()->getDBLock());
theApp->getTxnDB()->getDB()->executeSQL(sql.c_str());
theApp->getTxnDB()->getDB()->executeSQL(sql.c_str(), true);
return key;
}