From 3414a1776b2a2eef379a83cc7fb8ba6544a62396 Mon Sep 17 00:00:00 2001 From: yinyiqian1 Date: Thu, 2 Apr 2026 16:48:35 -0400 Subject: [PATCH] docs: Add explanatory comment to checkFee (#6631) --- src/libxrpl/tx/Transactor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libxrpl/tx/Transactor.cpp b/src/libxrpl/tx/Transactor.cpp index 7d2ac06fc1..8847174122 100644 --- a/src/libxrpl/tx/Transactor.cpp +++ b/src/libxrpl/tx/Transactor.cpp @@ -363,6 +363,13 @@ Transactor::checkFee(PreclaimContext const& ctx, XRPAmount baseFee) auto const balance = (*sle)[sfBalance].xrp(); + // NOTE: Because preclaim evaluates against a static readview, it + // does not reflect fee deductions from other transactions paid by + // the same account within the current ledger. + // As a result, if an account's balance is over-committed across multiple + // transactions, this check may pass optimistically. + // The fee shortfall will be handled by the Transactor::reset mechanism, + // which caps the fee to the remaining actual balance. if (balance < feePaid) { JLOG(ctx.j.trace()) << "Insufficient balance:" << " balance=" << to_string(balance)