20#include <xrpld/app/tx/apply.h>
22#include <xrpl/protocol/Feature.h>
39 obj[sfLedgerSequence] =
seq;
40 if (rules.
enabled(featureXRPFees))
44 obj[sfReserveIncrementDrops] =
XRPAmount{0};
49 obj[sfReserveBase] = 0;
50 obj[sfReserveIncrement] = 0;
51 obj[sfReferenceFeeUnits] = 0;
57 obj.setFieldH256(sfAmendment,
uint256(2));
58 obj.setFieldU32(sfLedgerSequence,
seq);
70 ttACCOUNT_SET, [&](
auto& obj) { obj[sfAccount] =
AccountID(1); }));
73 obj.setAccountID(sfAccount,
AccountID(2));
74 obj.setAccountID(sfDestination,
AccountID(3));
84 Env env(*
this, features);
86 for (
auto const& stx :
92 BEAST_EXPECT(reason ==
"Cannot submit pseudo transactions.");
97 BEAST_EXPECT(!result.applied && result.ter ==
temINVALID);
98 return result.applied;
117 using namespace test::jtx;
127BEAST_DEFINE_TESTSUITE(PseudoTx, app,
ripple);
A generic endpoint for log messages.
virtual OpenLedger & openLedger()=0
bool modify(modify_type const &f)
Modify the open ledger.
Writable ledger view that accumulates state and tx changes.
Rules controlling protocol behavior.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
A transaction testing environment.
std::shared_ptr< ReadView const > closed()
Returns the last closed ledger.
T emplace_back(T... args)
FeatureBitset supported_amendments()
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
bool isPseudoTx(STObject const &tx)
Check whether a transaction is a pseudo-transaction.
ApplyResult apply(Application &app, OpenView &view, STTx const &tx, ApplyFlags flags, beast::Journal journal)
Apply a transaction to an OpenView.
bool passesLocalChecks(STObject const &st, std::string &)
void testPrevented(FeatureBitset features)
void run() override
Runs the suite.
std::vector< STTx > getPseudoTxs(Rules const &rules, std::uint32_t seq)
std::vector< STTx > getRealTxs()
Set the sequence number on a JTx.