Merge remote-tracking branch 'origin/tapanito/transaction-invariant' into tapanito/transactor-invariant-pt2

This commit is contained in:
Vito
2026-03-24 16:10:33 +01:00
5 changed files with 16 additions and 21 deletions

View File

@@ -122,7 +122,9 @@ protected:
public:
virtual ~Transactor() = default;
enum ConsequencesFactoryType { Normal, Blocker, Custom };
/** Process the transaction. */
ApplyResult
operator()();
@@ -142,8 +144,8 @@ public:
/** Check all invariants for the current transaction.
*
* Runs transaction-specific invariants first (visitInvariantEntry +
* finalizeInvariants), then protocol-level invariants. Protocol
* invariants are skipped if a transaction invariant already failed.
* finalizeInvariants), then protocol-level invariants. Both layers
* always run; the worst failure code is returned.
*
* @param result the tentative TER from transaction processing.
* @param fee the fee consumed by the transaction.

View File

@@ -343,15 +343,4 @@ calculateDefaultBaseFee(ReadView const& view, STTx const& tx);
ApplyResult
doApply(PreclaimResult const& preclaimResult, ServiceRegistry& registry, OpenView& view);
class ApplyContext;
class Transactor;
/** Create a concrete Transactor subclass for the given ApplyContext.
*
* The transaction type is determined from the STTx held in the context.
* Returns nullptr if the transaction type is unknown.
*/
std::unique_ptr<Transactor>
makeTransactor(ApplyContext& ctx);
} // namespace xrpl