mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
Implement enhanced Ticket support:
Tickets are a mechanism to allow for the "out-of-order" execution of transactions on the XRP Ledger. This commit, if merged, reworks the existing support for tickets and introduces support for 'ticket batching', completing the feature set needed for tickets. The code is gated under the newly-introduced `TicketBatch` amendment and the `Tickets` amendment, which is not presently active on the network, is being removed. The specification for this change can be found at: https://github.com/xrp-community/standards-drafts/issues/16
This commit is contained in:
committed by
Nik Bougalis
parent
01bd5a2646
commit
7724cca384
@@ -349,8 +349,7 @@ public:
|
||||
Account const gw{"gateway"};
|
||||
auto const USD = gw["USD"];
|
||||
|
||||
// Test for ticket account objects when they are supported.
|
||||
Env env(*this, supported_amendments().set(featureTickets));
|
||||
Env env(*this, supported_amendments() | featureTicketBatch);
|
||||
|
||||
// Make a lambda we can use to get "account_objects" easily.
|
||||
auto acct_objs = [&env](Account const& acct, char const* type) {
|
||||
@@ -504,7 +503,7 @@ public:
|
||||
BEAST_EXPECT(entry[sfSignerWeight.jsonName].asUInt() == 7);
|
||||
}
|
||||
// Create a Ticket for gw.
|
||||
env(ticket::create(gw, gw));
|
||||
env(ticket::create(gw, 1));
|
||||
env.close();
|
||||
{
|
||||
// Find the ticket.
|
||||
@@ -514,7 +513,7 @@ public:
|
||||
auto const& ticket = resp[jss::result][jss::account_objects][0u];
|
||||
BEAST_EXPECT(ticket[sfAccount.jsonName] == gw.human());
|
||||
BEAST_EXPECT(ticket[sfLedgerEntryType.jsonName] == jss::Ticket);
|
||||
BEAST_EXPECT(ticket[sfSequence.jsonName].asUInt() == 11);
|
||||
BEAST_EXPECT(ticket[sfTicketSequence.jsonName].asUInt() == 12);
|
||||
}
|
||||
{
|
||||
// See how "deletion_blockers_only" handles gw's directory.
|
||||
|
||||
Reference in New Issue
Block a user