From 273f8a13cdbb5b64bba102c03ca900a876f4e67a Mon Sep 17 00:00:00 2001 From: Vito <5780819+Tapanito@users.noreply.github.com> Date: Wed, 22 Apr 2026 10:00:13 +0200 Subject: [PATCH] fix: Log transaction JSON on invariant failure The fatal log emitted when finalizeInvariants returns false previously lacked identifying information, making postmortems difficult. Include the full transaction JSON, matching the global invariant checker. --- src/libxrpl/tx/Transactor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libxrpl/tx/Transactor.cpp b/src/libxrpl/tx/Transactor.cpp index 8d9d0b6201..4498c6d66c 100644 --- a/src/libxrpl/tx/Transactor.cpp +++ b/src/libxrpl/tx/Transactor.cpp @@ -1131,8 +1131,9 @@ Transactor::checkTransactionInvariants(TER result, XRPAmount fee) // Phase 2: finalize if (!this->finalizeInvariants(ctx_.tx, result, fee, ctx_.view(), ctx_.journal)) { - JLOG(ctx_.journal.fatal()) << // - "Transaction has failed one or more transaction invariants"; + JLOG(ctx_.journal.fatal()) << // + "Transaction has failed one or more transaction invariants, tx: " << // + to_string(ctx_.tx.getJson(JsonOptions::none)); return tecINVARIANT_FAILED; } }