mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 14:05:51 +00:00
Clean up. No more 'tep'.
This commit is contained in:
@@ -112,9 +112,11 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa
|
|||||||
|
|
||||||
cLog(lsINFO) << "applyTransaction: terResult=" << strToken << " : " << terResult << " : " << strHuman;
|
cLog(lsINFO) << "applyTransaction: terResult=" << strToken << " : " << terResult << " : " << strHuman;
|
||||||
|
|
||||||
if (isTecClaim(terResult) && !isSetBit(params, tapRETRY))
|
if (isTesSuccess(terResult))
|
||||||
|
didApply = true;
|
||||||
|
else if (isTecClaim(terResult) && !isSetBit(params, tapRETRY))
|
||||||
{ // only claim the transaction fee
|
{ // only claim the transaction fee
|
||||||
cLog(lsINFO) << "Reprocessing to only claim fee";
|
cLog(lsDEBUG) << "Reprocessing to only claim fee";
|
||||||
mNodes.clear();
|
mNodes.clear();
|
||||||
|
|
||||||
SLE::pointer txnAcct = entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(txn.getSourceAccount()));
|
SLE::pointer txnAcct = entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(txn.getSourceAccount()));
|
||||||
@@ -151,14 +153,12 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((terResult == tesSUCCESS) || (isTesSuccess(terResult) && !isSetBit(params, tapRETRY)))
|
|
||||||
didApply = true;
|
|
||||||
else
|
else
|
||||||
cLog(lsINFO) << "Not applying transaction";
|
cLog(lsDEBUG) << "Not applying transaction";
|
||||||
|
|
||||||
if (didApply)
|
if (didApply)
|
||||||
{
|
{
|
||||||
// Transaction succeeded fully or (retries are not allowed and the transaction succeeded partially).
|
// Transaction succeeded fully or (retries are not allowed and the transaction could claim a fee)
|
||||||
Serializer m;
|
Serializer m;
|
||||||
mNodes.calcRawMeta(m, terResult, mTxnSeq++);
|
mNodes.calcRawMeta(m, terResult, mTxnSeq++);
|
||||||
|
|
||||||
@@ -177,8 +177,8 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa
|
|||||||
if (!mLedger->addTransaction(txID, s, m))
|
if (!mLedger->addTransaction(txID, s, m))
|
||||||
assert(false);
|
assert(false);
|
||||||
|
|
||||||
STAmount saPaid = txn.getTransactionFee();
|
|
||||||
// Charge whatever fee they specified.
|
// Charge whatever fee they specified.
|
||||||
|
STAmount saPaid = txn.getTransactionFee();
|
||||||
mLedger->destroyCoins(saPaid.getNValue());
|
mLedger->destroyCoins(saPaid.getNValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ enum TER // aka TransactionEngineResult
|
|||||||
#define isTemMalformed(x) ((x) >= temMALFORMED && (x) < tefFAILURE)
|
#define isTemMalformed(x) ((x) >= temMALFORMED && (x) < tefFAILURE)
|
||||||
#define isTefFailure(x) ((x) >= tefFAILURE && (x) < terRETRY)
|
#define isTefFailure(x) ((x) >= tefFAILURE && (x) < terRETRY)
|
||||||
#define isTerRetry(x) ((x) >= terRETRY && (x) < tesSUCCESS)
|
#define isTerRetry(x) ((x) >= terRETRY && (x) < tesSUCCESS)
|
||||||
#define isTesSuccess(x) ((x) >= tesSUCCESS)
|
#define isTesSuccess(x) ((x) == tesSUCCESS)
|
||||||
#define isTecClaim(x) ((x) >= tecCLAIM)
|
#define isTecClaim(x) ((x) >= tecCLAIM)
|
||||||
|
|
||||||
bool transResultInfo(TER terCode, std::string& strToken, std::string& strHuman);
|
bool transResultInfo(TER terCode, std::string& strToken, std::string& strHuman);
|
||||||
|
|||||||
Reference in New Issue
Block a user