mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-06 18:26:51 +00:00
Change how fail_hard transactions are handled.
FIXES: #2847 * Transactions that are submitted with the fail_hard flag and that result in any TER code besides tesSUCCESS shall be neither queued nor held. [FOLD] Keep tec results out of the open ledger when fail_hard: * Improve TransactionStatus const correctness, and remove redundant `local` check * Check open ledger tx count in fail_hard tests * Fix some wrapping * Remove duplicate test
This commit is contained in:
@@ -670,7 +670,15 @@ Transactor::operator()()
|
||||
if (ctx_.size() > oversizeMetaDataCap)
|
||||
result = tecOVERSIZE;
|
||||
|
||||
if ((result == tecOVERSIZE) || (result == tecKILLED) ||
|
||||
if (isTecClaim(result) && (view().flags() & tapFAIL_HARD))
|
||||
{
|
||||
// If the tapFAIL_HARD flag is set, a tec result
|
||||
// must not do anything
|
||||
|
||||
ctx_.discard();
|
||||
applied = false;
|
||||
}
|
||||
else if ((result == tecOVERSIZE) || (result == tecKILLED) ||
|
||||
(isTecClaimHardFail (result, view().flags())))
|
||||
{
|
||||
JLOG(j_.trace()) << "reapplying because of " << transToken(result);
|
||||
|
||||
Reference in New Issue
Block a user