mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix the bug Jed reported. Need isTeRetry.
This commit is contained in:
@@ -977,21 +977,23 @@ void LedgerConsensus::applyTransaction(TransactionEngine& engine, const Serializ
|
||||
{
|
||||
#endif
|
||||
TER result = engine.applyTransaction(*txn, parms);
|
||||
if (result > 0)
|
||||
if (isTerRetry(result
|
||||
{
|
||||
Log(lsINFO) << " retry";
|
||||
assert(!ledger->hasTransaction(txn->getTransactionID()));
|
||||
failedTransactions.push_back(txn);
|
||||
}
|
||||
else if (result == 0)
|
||||
else if (isTepSuccess(result)) // FIXME: Need to do partial success
|
||||
{
|
||||
Log(lsTRACE) << " success";
|
||||
assert(ledger->hasTransaction(txn->getTransactionID()));
|
||||
}
|
||||
else
|
||||
else if (isTemMalformed(result) || isTefFailure(result))
|
||||
{
|
||||
Log(lsINFO) << " hard fail";
|
||||
}
|
||||
else
|
||||
assert(false);
|
||||
#ifndef TRUST_NETWORK
|
||||
}
|
||||
catch (...)
|
||||
|
||||
@@ -111,6 +111,8 @@ enum TER // aka TransactionEngineResult
|
||||
#define isTemMalformed(x) ((x) >= temMALFORMED && (x) < tefFAILURE)
|
||||
#define isTefFailure(x) ((x) >= tefFAILURE && (x) < terRETRY)
|
||||
#define isTepPartial(x) ((x) >= tepPATH_PARTIAL)
|
||||
#define isTepSucess(x) ((x) >= tesSUCCESS)
|
||||
#define isTerRetry(x) ((x) >= terRETRY && (x) < tesSUCCESS)
|
||||
|
||||
bool transResultInfo(TER terCode, std::string& strToken, std::string& strHuman);
|
||||
std::string transToken(TER terCode);
|
||||
|
||||
Reference in New Issue
Block a user