Add an error code for a transaction that violates invariants.

This commit is contained in:
JoelKatz
2013-03-27 09:38:47 -07:00
parent bfb69664ff
commit 920098d930
3 changed files with 3 additions and 0 deletions

View File

@@ -160,6 +160,7 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa
cLog(lsFATAL) << transToken(terResult) << ": " << transHuman(terResult);
cLog(lsFATAL) << mNodes.getJson(0);
didApply = false;
terResult = tefINTERNAL;
}
else
{

View File

@@ -38,6 +38,7 @@ bool transResultInfo(TER terCode, std::string& strToken, std::string& strHuman)
{ tefGEN_IN_USE, "tefGEN_IN_USE", "Generator already in use." },
{ tefNO_AUTH_REQUIRED, "tefNO_AUTH_REQUIRED", "Auth is not required." },
{ tefPAST_SEQ, "tefPAST_SEQ", "This sequence number has already past." },
{ tefINTERNAL, "tefINTERNAL", "Internal error." },
{ telLOCAL_ERROR, "telLOCAL_ERROR", "Local failure." },
{ telBAD_DOMAIN, "telBAD_DOMAIN", "Domain too long." },

View File

@@ -81,6 +81,7 @@ enum TER // aka TransactionEngineResult
tefGEN_IN_USE,
tefNO_AUTH_REQUIRED, // Can't set auth if auth is not required.
tefPAST_SEQ,
tefINTERNAL,
// -99 .. -1: R Retry (sequence too high, no funds for txn fee, originating account non-existent)
// Causes: