From 501994b432d68bcb6440b1e0c1dac83030c26ddc Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Thu, 25 Jun 2026 09:19:29 -0400 Subject: [PATCH] revert txqu blocker --- include/xrpl/tx/transactors/system/Batch.h | 2 +- src/libxrpl/ledger/OpenView.cpp | 2 +- src/test/app/Batch_test.cpp | 23 +++++++++++----------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/include/xrpl/tx/transactors/system/Batch.h b/include/xrpl/tx/transactors/system/Batch.h index 6d6f0ca92b..85d28ab341 100644 --- a/include/xrpl/tx/transactors/system/Batch.h +++ b/include/xrpl/tx/transactors/system/Batch.h @@ -7,7 +7,7 @@ namespace xrpl { class Batch : public Transactor { public: - static constexpr auto kConsequencesFactory = ConsequencesFactoryType::Blocker; + static constexpr auto kConsequencesFactory = ConsequencesFactoryType::Normal; explicit Batch(ApplyContext& ctx) : Transactor(ctx) { diff --git a/src/libxrpl/ledger/OpenView.cpp b/src/libxrpl/ledger/OpenView.cpp index e32b0444d3..26cb109f85 100644 --- a/src/libxrpl/ledger/OpenView.cpp +++ b/src/libxrpl/ledger/OpenView.cpp @@ -202,7 +202,7 @@ OpenView::txsEnd() const -> std::unique_ptr bool OpenView::txExists(key_type const& key) const { - return txs_.contains(key) || base_->txExists(key); + return txs_.contains(key); } auto diff --git a/src/test/app/Batch_test.cpp b/src/test/app/Batch_test.cpp index 3892e5d712..536a559cbd 100644 --- a/src/test/app/Batch_test.cpp +++ b/src/test/app/Batch_test.cpp @@ -4610,10 +4610,11 @@ class Batch_test : public beast::unit_test::Suite checkMetrics(*this, env, 1, std::nullopt, 3, 2); } - // A Batch is a TxQ blocker (it can advance the account sequence by - // more than one via an inner TicketCreate or multiple inner txns), - // so it must be alone in the account's queue. Once a Batch is queued - // no follow-on transaction from the same account can be appended. + // A Batch is not a TxQ blocker: it queues like an ordinary tx, so a + // follow-on transaction from the same account can be appended behind + // it. (The TxQ forecasts the account advancing by one; if the batch's + // own inners consume further sequences, a stale follow-on simply fails + // on apply - a soft, account-local effect.) { test::jtx::Env env{ *this, @@ -4641,22 +4642,22 @@ class Batch_test : public beast::unit_test::Suite auto const bobSeq = env.seq(bob); auto const batchFee = batch::calcBatchFee(env, 1, 2); - // Queue the Batch (blocker) as alice's lone queue entry. + // Queue the Batch. env(batch::outer(alice, aliceSeq, batchFee, tfAllOrNothing), batch::Inner(pay(alice, bob, XRP(10)), aliceSeq + 1), batch::Inner(pay(bob, alice, XRP(5)), bobSeq), batch::Sig(bob), Ter(terQUEUED)); - // A follow-on transaction from alice cannot be queued behind it. - env(noop(alice), Seq(aliceSeq + 1), Ter(telCAN_NOT_QUEUE_BLOCKED)); + // A follow-on transaction from alice can now be queued behind it. + env(noop(alice), Seq(aliceSeq + 1), Ter(terQUEUED)); // Other accounts are unaffected. env(noop(carol), Ter(terQUEUED)); } - // A Batch (blocker) cannot be queued when the account already holds - // other queued (non-blocker) transactions. + // A Batch can be queued even when the account already holds other + // queued transactions (it is not a blocker). { test::jtx::Env env{ *this, @@ -4683,14 +4684,14 @@ class Batch_test : public beast::unit_test::Suite env(noop(alice), Seq(aliceSeq + 0), Ter(terQUEUED)); env(noop(alice), Seq(aliceSeq + 1), Ter(terQUEUED)); - // The Batch (blocker) cannot join a non-empty account queue. + // The Batch can join the non-empty account queue. auto const bobSeq = env.seq(bob); auto const batchFee = batch::calcBatchFee(env, 1, 2); env(batch::outer(alice, aliceSeq + 2, batchFee, tfAllOrNothing), batch::Inner(pay(alice, bob, XRP(10)), aliceSeq + 3), batch::Inner(pay(bob, alice, XRP(5)), bobSeq), batch::Sig(bob), - Ter(telCAN_NOT_QUEUE_BLOCKS)); + Ter(terQUEUED)); } }