mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user