From f91cde86e25f4a7a79507a9fc3291021661f4762 Mon Sep 17 00:00:00 2001 From: Gregory Tsipenyuk Date: Fri, 14 Aug 2026 14:40:16 -0400 Subject: [PATCH] Add comments in doInvariantCheck to clarify {tec, tef} pair. --- src/test/app/Invariants_test.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/app/Invariants_test.cpp b/src/test/app/Invariants_test.cpp index 8fb69e6e48..7a192da004 100644 --- a/src/test/app/Invariants_test.cpp +++ b/src/test/app/Invariants_test.cpp @@ -217,7 +217,12 @@ class Invariants_test : public beast::unit_test::Suite if (!BEAST_EXPECT(transactor)) return; - // invoke check twice to cover tec and tef cases + // Invoke the check twice to cover the tec and tef cases. Both passes run + // against the same view -- unlike production, nothing is discarded in + // between (Transactor::reset would), so the second pass sees the same + // violation and escalates tec -> tef. A {tec, tef} pair therefore says + // "this invariant is enforced regardless of the incoming result", not + // that the transaction ends in tefINVARIANT_FAILED on ledger. if (!BEAST_EXPECT(ters.size() == 2)) return;