From a62ac8b32fd66eb0649de7ce1186e7731533fd29 Mon Sep 17 00:00:00 2001 From: Vito <5780819+Tapanito@users.noreply.github.com> Date: Wed, 25 Mar 2026 15:17:47 +0100 Subject: [PATCH] addresses review comments --- include/xrpl/tx/applySteps.h | 2 -- src/libxrpl/tx/Transactor.cpp | 2 ++ src/libxrpl/tx/applySteps.cpp | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/xrpl/tx/applySteps.h b/include/xrpl/tx/applySteps.h index 0ff71f75bc..9ce6dfb1e2 100644 --- a/include/xrpl/tx/applySteps.h +++ b/include/xrpl/tx/applySteps.h @@ -3,8 +3,6 @@ #include #include -#include - namespace xrpl { class ServiceRegistry; diff --git a/src/libxrpl/tx/Transactor.cpp b/src/libxrpl/tx/Transactor.cpp index 854025a20d..d98c43e639 100644 --- a/src/libxrpl/tx/Transactor.cpp +++ b/src/libxrpl/tx/Transactor.cpp @@ -1264,6 +1264,8 @@ Transactor::operator()() if (applied) { + // Check invariants: if `tecINVARIANT_FAILED` is not returned, we can + // proceed to apply the tx result = checkInvariants(result, fee); if (result == tecINVARIANT_FAILED) { diff --git a/src/libxrpl/tx/applySteps.cpp b/src/libxrpl/tx/applySteps.cpp index d473c587fe..67e679a6ec 100644 --- a/src/libxrpl/tx/applySteps.cpp +++ b/src/libxrpl/tx/applySteps.cpp @@ -295,6 +295,9 @@ invoke_apply(ApplyContext& ctx) } } +// Test-only factory — not part of the public API. +// The returned Transactor holds a raw reference to ctx; the caller must ensure +// the ApplyContext outlives the Transactor. std::unique_ptr makeTransactor(ApplyContext& ctx) {