mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Merge branch 'master' of github.com:jedmccaleb/NewCoin into notdone
This commit is contained in:
@@ -146,12 +146,13 @@ bool Transaction::save()
|
||||
default: status = TXN_SQL_UNKNOWN;
|
||||
}
|
||||
|
||||
std::string exists = boost::str(boost::format("SELECT Status FROM Transactions WHERE TransID = '%s';")
|
||||
% mTransaction->getTransactionID().GetHex());
|
||||
static boost::format selStat("SELECT Status FROM Transactions WHERE TransID = '%s';");
|
||||
std::string exists = boost::str(selStat % mTransaction->getTransactionID().GetHex());
|
||||
|
||||
Database *db = theApp->getTxnDB()->getDB();
|
||||
ScopedLock dbLock = theApp->getTxnDB()->getDBLock();
|
||||
if (SQL_EXISTS(db, exists)) return false;
|
||||
ScopedLock dbLock(theApp->getTxnDB()->getDBLock());
|
||||
if (SQL_EXISTS(db, exists))
|
||||
return false;
|
||||
return
|
||||
db->executeSQL(mTransaction->getSQLInsertHeader() + mTransaction->getSQL(getLedger(), status) + ";");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user