mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fix: Remove unreachable tefINVARIANT_FAILED check on tx invariants
checkTransactionInvariants only returns tecINVARIANT_FAILED or the input result, never tefINVARIANT_FAILED. Only protocol invariants can escalate to tef, so the txResult comparison was dead code.
This commit is contained in:
@@ -1165,7 +1165,7 @@ Transactor::checkInvariants(TER result, XRPAmount fee)
|
||||
auto const protoResult = ctx_.checkInvariants(result, fee);
|
||||
|
||||
// Fail if either check failed. tef (fatal) takes priority over tec.
|
||||
if (txResult == tefINVARIANT_FAILED || protoResult == tefINVARIANT_FAILED)
|
||||
if (protoResult == tefINVARIANT_FAILED)
|
||||
return tefINVARIANT_FAILED;
|
||||
if (txResult == tecINVARIANT_FAILED || protoResult == tecINVARIANT_FAILED)
|
||||
return tecINVARIANT_FAILED;
|
||||
|
||||
Reference in New Issue
Block a user