3#include <xrpld/core/JobQueue.h> 
   17        auto const alice = 
Account(
"alice");
 
   20        auto const aliceSequence = env.
seq(alice);
 
   22        auto const tx1 = env.
jt(
noop(alice), 
seq(aliceSequence));
 
   28        BEAST_EXPECT(env.
seq(alice) == aliceSequence + 1);
 
   31        BEAST_EXPECT(env.
seq(alice) == aliceSequence + 2);
 
   39                result[
"result"][
"meta"][
"TransactionResult"] == 
"tesSUCCESS");
 
   45                result[
"result"][
"meta"][
"TransactionResult"] == 
"tesSUCCESS");
 
 
   57            cfg->FORCE_MULTI_THREAD = 
false;
 
   61        auto const alice = 
Account(
"alice");
 
   64        auto const aliceSequence = env.
seq(alice);
 
   66        auto const tx1 = env.
jt(
noop(alice), 
seq(aliceSequence));
 
   71        BEAST_EXPECT(env.
seq(alice) == aliceSequence);
 
   74        BEAST_EXPECT(env.
seq(alice) == aliceSequence + 2);
 
   82                result[
"result"][
"meta"][
"TransactionResult"] == 
"tesSUCCESS");
 
   88                result[
"result"][
"meta"][
"TransactionResult"] == 
"tesSUCCESS");
 
 
   97        testcase(
"Incorrect order multiple intermediaries");
 
  100            cfg->FORCE_MULTI_THREAD = 
true;
 
  104        auto const alice = 
Account(
"alice");
 
  107        auto const aliceSequence = env.
seq(alice);
 
  110        for (
auto i = 0; i < 5; ++i)
 
  116        for (
auto i = 1; i < 5; ++i)
 
  119            BEAST_EXPECT(env.
seq(alice) == aliceSequence);
 
  124        BEAST_EXPECT(env.
seq(alice) == aliceSequence + 5);
 
  128        for (
auto i = 0; i < 5; ++i)
 
  131                env.
rpc(
"tx", 
to_string(tx[i].stx->getTransactionID()));
 
  133                result[
"result"][
"meta"][
"TransactionResult"] == 
"tesSUCCESS");
 
 
 
  146BEAST_DEFINE_TESTSUITE(Transaction_ordering, app, 
ripple);
 
testcase_t testcase
Memberspace for declaring test cases.
 
virtual JobQueue & getJobQueue()=0
 
void rendezvous()
Block until no jobs running.
 
Immutable cryptographic account descriptor.
 
A transaction testing environment.
 
std::uint32_t seq(Account const &account) const
Returns the next sequence number on account.
 
bool close(NetClock::time_point closeTime, std::optional< std::chrono::milliseconds > consensusDelay=std::nullopt)
Close and advance the ledger.
 
JTx jt(JsonValue &&jv, FN const &... fN)
Create a JTx from parameters.
 
Json::Value rpc(unsigned apiVersion, std::unordered_map< std::string, std::string > const &headers, std::string const &cmd, Args &&... args)
Execute an RPC command.
 
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
 
Set the expected result code for a JTx The test will fail if the code doesn't match.
 
T emplace_back(T... args)
 
std::unique_ptr< Config > envconfig()
creates and initializes a default configuration for jtx::Env
 
XRP_t const XRP
Converts to XRP Issue or STAmount.
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
std::string to_string(base_uint< Bits, Tag > const &a)
 
void run() override
Runs the suite.
 
void testIncorrectOrder()
 
void testIncorrectOrderMultipleIntermediaries()
 
Set the sequence number on a JTx.