Buglet. We mishandle create.

This commit is contained in:
JoelKatz
2012-05-01 18:37:22 -07:00
parent 8807cbae87
commit 8f0ed4d2e9

View File

@@ -85,8 +85,12 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
// WRITEME: Special case code for changing transaction key // WRITEME: Special case code for changing transaction key
for(std::vector<AffectedAccount>::iterator it=accounts.begin(), end=accounts.end(); for(std::vector<AffectedAccount>::iterator it=accounts.begin(), end=accounts.end();
it != end; ++it) it != end; ++it)
{ { if (it->first == taaCREATE)
if ( (it->first==taaMODIFY) || (it->first==taaCREATE) ) {
if (mLedger->writeBack(lepCREATE, it->second) & lepERROR)
assert(false);
}
else if (it->first==taaMODIFY)
{ {
if(mLedger->writeBack(lepNONE, it->second) & lepERROR) if(mLedger->writeBack(lepNONE, it->second) & lepERROR)
assert(false); assert(false);