Clean up the TransactionEngineParameter flags. Clarify the semantics for

soft failure. Note that the code will not yet invoke a transaction with a
retry flag, but the support is there for transcations to handle it.
This commit is contained in:
JoelKatz
2012-08-29 23:02:06 -07:00
parent 6b144f8749
commit 6282ad4a88
5 changed files with 21 additions and 21 deletions

View File

@@ -973,7 +973,7 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn,
naSigningPubKey = NewcoinAddress::createAccountPublic(txn.peekSigningPubKey());
// Consistency: really signed.
if ((tesSUCCESS == terResult) && ((params & tepNO_CHECK_SIGN) == 0) && !txn.checkSign(naSigningPubKey))
if ((tesSUCCESS == terResult) && ((params & temNO_CHECK_SIGN) == 0) && !txn.checkSign(naSigningPubKey))
{
Log(lsWARNING) << "applyTransaction: Invalid transaction: bad signature";
@@ -1032,8 +1032,8 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn,
STAmount saPaid = txn.getTransactionFee();
if (tesSUCCESS == terResult && (params & tepNO_CHECK_FEE) == tepNONE)
{
if (tesSUCCESS == terResult && (params & temOPEN_LEDGER) != temNONE)
{ // Applying to open ledger, check fee
if (!!saCost)
{
// XXX DO NOT CHECK ON CONSENSUS PASS
@@ -1322,7 +1322,7 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn,
if (!mLedger->addTransaction(txID, s))
assert(false);
if ((params & tepUPDATE_TOTAL) != tepNONE)
if ((params & temOPEN_LEDGER) == temNONE)
mLedger->destroyCoins(saPaid.getNValue());
}