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:
Vito
2026-04-22 15:25:38 +02:00
parent 0365449598
commit dd654f649e

View File

@@ -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;