We can't adjust the ledger coin total when we are processing

transactions non-finally.
This commit is contained in:
JoelKatz
2012-06-01 20:32:05 -07:00
parent 44451280e8
commit 1dfa9d0615
2 changed files with 5 additions and 1 deletions

View File

@@ -520,7 +520,10 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
Serializer s;
txn.add(s);
mLedger->addTransaction(txID, s, saPaid);
if (!mLedger->addTransaction(txID, s))
assert(false);
if ((params & tepUPDATE_TOTAL) != tepNONE)
mLedger->destroyCoins(saPaid.getNValue());
}
return result;