Add comments in doInvariantCheck to clarify {tec, tef} pair.

This commit is contained in:
Gregory Tsipenyuk
2026-08-14 14:40:16 -04:00
parent 2ea1a2ebb4
commit f91cde86e2

View File

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