From dd654f649ed4edabfddd442328ce970fa4abf2a6 Mon Sep 17 00:00:00 2001 From: Vito <5780819+Tapanito@users.noreply.github.com> Date: Wed, 22 Apr 2026 15:25:38 +0200 Subject: [PATCH] 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. --- src/libxrpl/tx/Transactor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libxrpl/tx/Transactor.cpp b/src/libxrpl/tx/Transactor.cpp index aac216a248..9791ee4c9b 100644 --- a/src/libxrpl/tx/Transactor.cpp +++ b/src/libxrpl/tx/Transactor.cpp @@ -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;