mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Some more cleanups.
This commit is contained in:
@@ -42,7 +42,7 @@ CKey::pointer PubKeyCache::locate(const NewcoinAddress& id)
|
||||
return ckp;
|
||||
}
|
||||
|
||||
CKey::pointer PubKeyCache::store(const NewcoinAddress& id, CKey::pointer key)
|
||||
CKey::pointer PubKeyCache::store(const NewcoinAddress& id, const CKey::pointer& key)
|
||||
{ // stored if needed, returns cached copy (possibly the original)
|
||||
{
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
@@ -51,14 +51,14 @@ CKey::pointer PubKeyCache::store(const NewcoinAddress& id, CKey::pointer key)
|
||||
return pit.first->second;
|
||||
}
|
||||
|
||||
std::vector<unsigned char> pk=key->GetPubKey();
|
||||
std::vector<unsigned char> pk = key->GetPubKey();
|
||||
std::string encodedPK;
|
||||
theApp->getTxnDB()->getDB()->escape(&(pk.front()), pk.size(), encodedPK);
|
||||
|
||||
std::string sql="INSERT INTO PubKeys (ID,PubKey) VALUES ('";
|
||||
sql+=id.humanAccountID();
|
||||
sql+="',";
|
||||
sql+=encodedPK;
|
||||
std::string sql = "INSERT INTO PubKeys (ID,PubKey) VALUES ('";
|
||||
sql += id.humanAccountID();
|
||||
sql += "',";
|
||||
sql += encodedPK;
|
||||
sql.append(");");
|
||||
|
||||
ScopedLock dbl(theApp->getTxnDB()->getDBLock());
|
||||
|
||||
Reference in New Issue
Block a user