22#include <xrpl/protocol/Feature.h>
32 using namespace test::jtx;
38 env.fund(
XRP(10000), alice, bob);
41 auto const ar = env.le(alice);
43 ar->isFieldPresent(sfRegularKey) &&
44 (ar->getAccountID(sfRegularKey) == bob.
id()));
72 using namespace test::jtx;
78 env.fund(
XRP(10000), alice, bob);
107 using namespace test::jtx;
111 "Set regular key to master key (before fixMasterKeyAsRegularKey)");
114 env.fund(
XRP(10000), alice);
125 env.enableFeature(fixMasterKeyAsRegularKey);
138 using namespace test::jtx;
141 "Set regular key to master key (after fixMasterKeyAsRegularKey)");
144 env.fund(
XRP(10000), alice);
153 using namespace test::jtx;
159 env.
fund(
XRP(10000), alice, bob);
161 auto ar = env.
le(alice);
163 ar->isFieldPresent(sfFlags) &&
170 ar->isFieldPresent(sfFlags) &&
177 env.
trust(bob[
"USD"](1), alice);
178 env(
pay(bob, alice, bob[
"USD"](1)));
181 ar->isFieldPresent(sfFlags) &&
188 using namespace test::jtx;
194 env.
fund(
XRP(10000), alice, bob);
196 auto jv =
regkey(alice, bob);
204 using namespace test::jtx;
209 env.fund(
XRP(1000), alice);
234 BEAST_EXPECT(env.seq(alice) == aliceSeq + 1);
testcase_t testcase
Memberspace for declaring test cases.
void testDisableMasterKeyAfterFix()
void testDisableRegularKeyAfterFix()
void run() override
Runs the suite.
void testDisableMasterKey()
void testDisabledRegularKey()
void testTicketRegularKey()
Immutable cryptographic account descriptor.
AccountID id() const
Returns the Account ID.
A transaction testing environment.
void trust(STAmount const &amount, Account const &account)
Establish trust lines.
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
std::shared_ptr< SLE const > le(Account const &account) const
Return an account root.
Set the regular signature on a JTx.
Set the expected result code for a JTx The test will fail if the code doesn't match.
Set a ticket sequence on a JTx.
Json::Value create(Account const &account, std::uint32_t count)
Create one of more tickets.
Json::Value fclear(Account const &account, std::uint32_t off)
Remove account flag.
Json::Value regkey(Account const &account, disabled_t)
Disable the regular key.
Json::Value fset(Account const &account, std::uint32_t on, std::uint32_t off=0)
Add and/or remove flag.
Json::Value pay(AccountID const &account, AccountID const &to, AnyAmount amount)
Create a payment.
static disabled_t const disabled
XRP_t const XRP
Converts to XRP Issue or STAmount.
FeatureBitset supported_amendments()
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr std::uint32_t asfDisableMaster
constexpr std::uint32_t tfUniversalMask