mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Remove db->escape in favor of sqlEscape.
This commit is contained in:
@@ -49,17 +49,16 @@ CKey::pointer PubKeyCache::store(const RippleAddress& id, const CKey::pointer& k
|
||||
}
|
||||
|
||||
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;
|
||||
sql += sqlEscape(pk);
|
||||
sql.append(");");
|
||||
|
||||
ScopedLock dbl(theApp->getTxnDB()->getDBLock());
|
||||
theApp->getTxnDB()->getDB()->executeSQL(sql, true);
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user