Make the transaction engine report whether it added the transaction.

This commit is contained in:
JoelKatz
2012-12-23 17:42:04 -08:00
parent adb9561c2c
commit 2c535940ac
4 changed files with 34 additions and 27 deletions

View File

@@ -91,8 +91,9 @@ Ledger::pointer LedgerMaster::closeLedger(bool recover)
{
try
{
TER result = mEngine.applyTransaction(*it->second, tapOPEN_LEDGER);
if (isTepSuccess(result))
bool didApply;
mEngine.applyTransaction(*it->second, tapOPEN_LEDGER, didApply);
if (didApply)
++recovers;
}
catch (...)
@@ -112,7 +113,9 @@ Ledger::pointer LedgerMaster::closeLedger(bool recover)
TER LedgerMaster::doTransaction(const SerializedTransaction& txn, TransactionEngineParams params)
{
TER result = mEngine.applyTransaction(txn, params);
bool didApply;
TER result = mEngine.applyTransaction(txn, params, didApply);
// CHECKME: Should we call this even on gross failures?
theApp->getOPs().pubProposedTransaction(mEngine.getLedger(), txn, result);
return result;
}