mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 07:10:53 +00:00
revert txqu blocker
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -202,7 +202,7 @@ OpenView::txsEnd() const -> std::unique_ptr<TxsType::iter_base>
|
||||
bool
|
||||
OpenView::txExists(key_type const& key) const
|
||||
{
|
||||
return txs_.contains(key) || base_->txExists(key);
|
||||
return txs_.contains(key);
|
||||
}
|
||||
|
||||
auto
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user