22#include <xrpl/protocol/Feature.h>
23#include <xrpl/protocol/jss.h>
33 using namespace test::jtx;
37 p->FEES.reference_fee = 10;
40 env.fund(
XRP(10000), alice);
42 auto lc_result = env.rpc(
"ledger_closed")[jss::result];
44 lc_result[jss::ledger_hash] ==
45 "CCC3B3E88CCAC17F1BE6B4A648A55999411F19E3FE55EB721960EB0DF28EDDA5");
46 BEAST_EXPECT(lc_result[jss::ledger_index] == 2);
49 auto const ar_master = env.le(env.master);
50 BEAST_EXPECT(ar_master->getAccountID(sfAccount) == env.master.id());
51 BEAST_EXPECT((*ar_master)[sfBalance] ==
drops(99999989999999980));
53 auto const ar_alice = env.le(alice);
54 BEAST_EXPECT(ar_alice->getAccountID(sfAccount) == alice.id());
55 BEAST_EXPECT((*ar_alice)[sfBalance] ==
XRP(10000));
57 lc_result = env.rpc(
"ledger_closed")[jss::result];
59 lc_result[jss::ledger_hash] ==
60 "E86DE7F3D7A4D9CE17EF7C8BA08A8F4D8F643B9552F0D895A31CDA78F541DE4E");
61 BEAST_EXPECT(lc_result[jss::ledger_index] == 3);
71BEAST_DEFINE_TESTSUITE(LedgerClosed, app,
ripple);
void run() override
Runs the suite.
Immutable cryptographic account descriptor.
A transaction testing environment.
PrettyAmount drops(Integer i)
Returns an XRP PrettyAmount, which is trivially convertible to STAmount.
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.