rippled
CrossingLimits_test.cpp
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012, 2013 Ripple Labs Inc.
5  Permission to use, copy, modify, and/or distribute this software for any
6  purpose with or without fee is hereby granted, provided that the above
7  copyright notice and this permission notice appear in all copies.
8  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16 //==============================================================================
17 
18 #include <test/jtx.h>
19 #include <ripple/beast/unit_test.h>
20 #include <ripple/protocol/Feature.h>
21 
22 namespace ripple {
23 namespace test {
24 
25 class CrossingLimits_test : public beast::unit_test::suite
26 {
27 private:
28  void
30  jtx::Env& env,
31  std::size_t n,
32  jtx::Account const& account,
33  STAmount const& in,
34  STAmount const& out)
35  {
36  using namespace jtx;
37  auto const ownerCount = env.le(account)->getFieldU32(sfOwnerCount);
38  for (std::size_t i = 0; i < n; i++)
39  {
40  env(offer(account, in, out));
41  env.close();
42  }
43  env.require (owners (account, ownerCount + n));
44  }
45 
46 public:
47 
48  void
50  {
51  testcase ("Step Limit");
52 
53  using namespace jtx;
54  Env env(*this, features);
55 
56  auto const gw = Account("gateway");
57  auto const USD = gw["USD"];
58 
59  env.fund(XRP(100000000), gw, "alice", "bob", "carol", "dan");
60  env.trust(USD(1), "bob");
61  env(pay(gw, "bob", USD(1)));
62  env.trust(USD(1), "dan");
63  env(pay(gw, "dan", USD(1)));
64  n_offers (env, 2000, "bob", XRP(1), USD(1));
65  n_offers (env, 1, "dan", XRP(1), USD(1));
66 
67  // Alice offers to buy 1000 XRP for 1000 USD. She takes Bob's first
68  // offer, removes 999 more as unfunded, then hits the step limit.
69  env(offer("alice", USD(1000), XRP(1000)));
70  env.require (balance("alice", USD(1)));
71  env.require (owners("alice", 2));
72  env.require (balance("bob", USD(0)));
73  env.require (owners("bob", 1001));
74  env.require (balance("dan", USD(1)));
75  env.require (owners("dan", 2));
76 
77  // Carol offers to buy 1000 XRP for 1000 USD. She removes Bob's next
78  // 1000 offers as unfunded and hits the step limit.
79  env(offer("carol", USD(1000), XRP(1000)));
80  env.require (balance("carol", USD(none)));
81  env.require (owners("carol", 1));
82  env.require (balance("bob", USD(0)));
83  env.require (owners("bob", 1));
84  env.require (balance("dan", USD(1)));
85  env.require (owners("dan", 2));
86  }
87 
88  void
90  {
91  testcase ("Crossing Limit");
92 
93  using namespace jtx;
94  Env env(*this, features);
95 
96  auto const gw = Account("gateway");
97  auto const USD = gw["USD"];
98 
99  // The number of allowed offers to cross is different between
100  // Taker and FlowCross. Taker allows 850 and FlowCross allows 1000.
101  // Accommodate that difference in the test.
102  int const maxConsumed = features[featureFlowCross] ? 1000 : 850;
103 
104  env.fund(XRP(100000000), gw, "alice", "bob", "carol");
105  int const bobsOfferCount = maxConsumed + 150;
106  env.trust(USD(bobsOfferCount), "bob");
107  env(pay(gw, "bob", USD(bobsOfferCount)));
108  env.close();
109  n_offers (env, bobsOfferCount, "bob", XRP(1), USD(1));
110 
111  // Alice offers to buy Bob's offers. However she hits the offer
112  // crossing limit, so she can't buy them all at once.
113  env(offer("alice", USD(bobsOfferCount), XRP(bobsOfferCount)));
114  env.close();
115  env.require (balance("alice", USD(maxConsumed)));
116  env.require (balance("bob", USD(150)));
117  env.require (owners ("bob", 150 + 1));
118 
119  // Carol offers to buy 1000 XRP for 1000 USD. She takes Bob's
120  // remaining 150 offers without hitting a limit.
121  env(offer("carol", USD(1000), XRP(1000)));
122  env.close();
123  env.require (balance("carol", USD(150)));
124  env.require (balance("bob", USD(0)));
125  env.require (owners ("bob", 1));
126  }
127 
128  void
130  {
131  testcase ("Step And Crossing Limit");
132 
133  using namespace jtx;
134  Env env(*this, features);
135 
136  auto const gw = Account("gateway");
137  auto const USD = gw["USD"];
138 
139  env.fund(XRP(100000000), gw, "alice", "bob", "carol", "dan", "evita");
140 
141  // The number of offers allowed to cross is different between
142  // Taker and FlowCross. Taker allows 850 and FlowCross allows 1000.
143  // Accommodate that difference in the test.
144  bool const isFlowCross {features[featureFlowCross]};
145  int const maxConsumed = isFlowCross ? 1000 : 850;
146 
147  int const evitasOfferCount {maxConsumed + 49};
148  env.trust(USD(1000), "alice");
149  env(pay(gw, "alice", USD(1000)));
150  env.trust(USD(1000), "carol");
151  env(pay(gw, "carol", USD(1)));
152  env.trust(USD(evitasOfferCount + 1), "evita");
153  env(pay(gw, "evita", USD(evitasOfferCount + 1)));
154 
155  // Taker and FlowCross have another difference we must accommodate.
156  // Taker allows a total of 1000 unfunded offers to be consumed
157  // beyond the 850 offers it can take. FlowCross draws no such
158  // distinction; its limit is 1000 funded or unfunded.
159  //
160  // Give carol an extra 150 (unfunded) offers when we're using Taker
161  // to accommodate that difference.
162  int const carolsOfferCount {isFlowCross ? 700 : 850};
163  n_offers (env, 400, "alice", XRP(1), USD(1));
164  n_offers (env, carolsOfferCount, "carol", XRP(1), USD(1));
165  n_offers (env, evitasOfferCount, "evita", XRP(1), USD(1));
166 
167  // Bob offers to buy 1000 XRP for 1000 USD. He takes all 400 USD from
168  // Alice's offers, 1 USD from Carol's and then removes 599 of Carol's
169  // offers as unfunded, before hitting the step limit.
170  env(offer("bob", USD(1000), XRP(1000)));
171  env.require (balance("bob", USD(401)));
172  env.require (balance("alice", USD(600)));
173  env.require (owners("alice", 1));
174  env.require (balance("carol", USD(0)));
175  env.require (owners("carol", carolsOfferCount - 599));
176  env.require (balance("evita", USD(evitasOfferCount + 1)));
177  env.require (owners("evita", evitasOfferCount + 1));
178 
179  // Dan offers to buy maxConsumed + 50 XRP USD. He removes all of
180  // Carol's remaining offers as unfunded, then takes
181  // (maxConsumed - 100) USD from Evita's, hitting the crossing limit.
182  env(offer("dan", USD(maxConsumed + 50), XRP(maxConsumed + 50)));
183  env.require (balance("dan", USD(maxConsumed - 100)));
184  env.require (owners("dan", 2));
185  env.require (balance("alice", USD(600)));
186  env.require (owners("alice", 1));
187  env.require (balance("carol", USD(0)));
188  env.require (owners("carol", 1));
189  env.require (balance("evita", USD(150)));
190  env.require (owners("evita", 150));
191  }
192 
194  {
195  testcase ("Auto Bridged Limits Taker");
196 
197  using namespace jtx;
198  Env env(*this, features);
199 
200  auto const gw = Account("gateway");
201  auto const USD = gw["USD"];
202  auto const EUR = gw["EUR"];
203 
204  env.fund(XRP(100000000), gw, "alice", "bob", "carol", "dan", "evita");
205 
206  env.trust(USD(2000), "alice");
207  env(pay(gw, "alice", USD(2000)));
208  env.trust(USD(1000), "carol");
209  env(pay(gw, "carol", USD(3)));
210  env.trust(USD(1000), "evita");
211  env(pay(gw, "evita", USD(1000)));
212 
213  n_offers (env, 302, "alice", EUR(2), XRP(1));
214  n_offers (env, 300, "alice", XRP(1), USD(4));
215  n_offers (env, 497, "carol", XRP(1), USD(3));
216  n_offers (env, 1001, "evita", EUR(1), USD(1));
217 
218  // Bob offers to buy 2000 USD for 2000 EUR, even though he only has
219  // 1000 EUR.
220  // 1. He spends 600 EUR taking Alice's auto-bridged offers and
221  // gets 1200 USD for that.
222  // 2. He spends another 2 EUR taking one of Alice's EUR->XRP and
223  // one of Carol's XRP-USD offers. He gets 3 USD for that.
224  // 3. The remainder of Carol's offers are now unfunded. We've
225  // consumed 602 offers so far. We now chew through 398 more
226  // of Carol's unfunded offers until we hit the 1000 offer limit.
227  // This sets have_bridge to false -- we will handle no more
228  // bridged offers.
229  // 4. However, have_direct is still true. So we go around one more
230  // time and take one of Evita's offers.
231  // 5. After taking one of Evita's offers we notice (again) that our
232  // offer count was exceeded. So we completely stop after taking
233  // one of Evita's offers.
234  env.trust(EUR(10000), "bob");
235  env.close();
236  env(pay(gw, "bob", EUR(1000)));
237  env.close();
238  env(offer("bob", USD(2000), EUR(2000)));
239  env.require (balance("bob", USD(1204)));
240  env.require (balance("bob", EUR( 397)));
241 
242  env.require (balance("alice", USD(800)));
243  env.require (balance("alice", EUR(602)));
244  env.require (offers("alice", 1));
245  env.require (owners("alice", 3));
246 
247  env.require (balance("carol", USD(0)));
248  env.require (balance("carol", EUR(none)));
249  env.require (offers("carol", 100));
250  env.require (owners("carol", 101));
251 
252  env.require (balance("evita", USD(999)));
253  env.require (balance("evita", EUR(1)));
254  env.require (offers("evita", 1000));
255  env.require (owners("evita", 1002));
256 
257  // Dan offers to buy 900 EUR for 900 USD.
258  // 1. He removes all 100 of Carol's remaining unfunded offers.
259  // 2. Then takes 850 USD from Evita's offers.
260  // 3. Consuming 850 of Evita's funded offers hits the crossing
261  // limit. So Dan's offer crossing stops even though he would
262  // be willing to take another 50 of Evita's offers.
263  env.trust(EUR(10000), "dan");
264  env.close();
265  env(pay(gw, "dan", EUR(1000)));
266  env.close();
267 
268  env(offer("dan", USD(900), EUR(900)));
269  env.require (balance("dan", USD(850)));
270  env.require (balance("dan", EUR(150)));
271 
272  env.require (balance("alice", USD(800)));
273  env.require (balance("alice", EUR(602)));
274  env.require (offers("alice", 1));
275  env.require (owners("alice", 3));
276 
277  env.require (balance("carol", USD(0)));
278  env.require (balance("carol", EUR(none)));
279  env.require (offers("carol", 0));
280  env.require (owners("carol", 1));
281 
282  env.require (balance("evita", USD(149)));
283  env.require (balance("evita", EUR(851)));
284  env.require (offers("evita", 150));
285  env.require (owners("evita", 152));
286  }
287 
288  void
290  {
291  testcase("Auto Bridged Limits FlowCross");
292 
293  // If any book step in a payment strand consumes 1000 offers, the
294  // liquidity from the offers is used, but that strand will be marked as
295  // dry for the remainder of the transaction.
296 
297  using namespace jtx;
298 
299  auto const gw = Account("gateway");
300  auto const alice = Account("alice");
301  auto const bob = Account("bob");
302  auto const carol = Account("carol");
303 
304  auto const USD = gw["USD"];
305  auto const EUR = gw["EUR"];
306 
307  // There are two almost identical tests. There is a strand with a large
308  // number of unfunded offers that will cause the strand to be marked dry
309  // even though there will still be liquidity available on that strand.
310  // In the first test, the strand has the best initial quality. In the
311  // second test the strand does not have the best quality (the
312  // implementation has to handle this case correct and not mark the
313  // strand dry until the liquidity is actually used)
314  {
315  Env env(*this, features);
316 
317  env.fund(XRP(100000000), gw, alice, bob, carol);
318 
319  env.trust(USD(4000), alice);
320  env(pay(gw, alice, USD(4000)));
321  env.trust(USD(1000), carol);
322  env(pay(gw, carol, USD(3)));
323 
324  // Notice the strand with the 800 unfunded offers has the initial
325  // best quality
326  n_offers(env, 2000, alice, EUR(2), XRP(1));
327  n_offers(env, 300, alice, XRP(1), USD(4));
328  n_offers(
329  env, 801, carol, XRP(1), USD(3)); // only one offer is funded
330  n_offers(env, 1000, alice, XRP(1), USD(3));
331 
332  n_offers(env, 1, alice, EUR(500), USD(500));
333 
334  // Bob offers to buy 2000 USD for 2000 EUR; He starts with 2000 EUR
335  // 1. The best quality is the autobridged offers that take 2 EUR
336  // and give 4 USD.
337  // Bob spends 600 EUR and receives 1200 USD.
338  //
339  // 2. The best quality is the autobridged offers that take 2 EUR
340  // and give 3 USD.
341  // a. One of Carol's offers is taken. This leaves her other
342  // offers unfunded.
343  // b. Carol's remaining 800 offers are consumed as unfunded.
344  // c. 199 of alice's XRP(1) to USD(3) offers are consumed.
345  // A book step is allowed to consume a maxium of 1000 offers
346  // at a given quality, and that limit is now reached.
347  // d. Now the strand is dry, even though there are still funded
348  // XRP(1) to USD(3) offers available. Bob has spent 400 EUR and
349  // received 600 USD in this step. (200 funded offers consumed
350  // 800 unfunded offers)
351  // 3. The best is the non-autobridged offers that takes 500 EUR and
352  // gives 500 USD.
353  // Bob has 2000 EUR, and has spent 600+400=1000 EUR. He has 1000
354  // left. Bob spent 500 EUR and receives 500 USD.
355  // In total: Bob spent EUR(600 + 400 + 500) = EUR(1500). He started
356  // with 2000 so has 500 remaining
357  // Bob received USD(1200 + 600 + 500) = USD(2300).
358  // Alice spent 300*4 + 199*3 + 500 = 2297 USD. She started
359  // with 4000 so has 1703 USD remaining. Alice received
360  // 600 + 400 + 500 = 1500 EUR
361  env.trust(EUR(10000), bob);
362  env.close();
363  env(pay(gw, bob, EUR(2000)));
364  env.close();
365  env(offer(bob, USD(4000), EUR(4000)));
366  env.close();
367 
368  env.require(balance(bob, USD(2300)));
369  env.require(balance(bob, EUR(500)));
370  env.require(offers(bob, 1));
371  env.require(owners(bob, 3));
372 
373  env.require(balance(alice, USD(1703)));
374  env.require(balance(alice, EUR(1500)));
375  auto const numAOffers =
376  2000 + 300 + 1000 + 1 - (2 * 300 + 2 * 199 + 1 + 1);
377  env.require(offers(alice, numAOffers));
378  env.require(owners(alice, numAOffers + 2));
379 
380  env.require(offers(carol, 0));
381  }
382  {
383  Env env(*this, features);
384 
385  env.fund(XRP(100000000), gw, alice, bob, carol);
386 
387  env.trust(USD(4000), alice);
388  env(pay(gw, alice, USD(4000)));
389  env.trust(USD(1000), carol);
390  env(pay(gw, carol, USD(3)));
391 
392  // Notice the strand with the 800 unfunded offers does not have the
393  // initial best quality
394  n_offers(env, 1, alice, EUR(1), USD(10));
395  n_offers(env, 2000, alice, EUR(2), XRP(1));
396  n_offers(env, 300, alice, XRP(1), USD(4));
397  n_offers(
398  env, 801, carol, XRP(1), USD(3)); // only one offer is funded
399  n_offers(env, 1000, alice, XRP(1), USD(3));
400 
401  n_offers(env, 1, alice, EUR(499), USD(499));
402 
403  // Bob offers to buy 2000 USD for 2000 EUR; He starts with 2000 EUR
404  // 1. The best quality is the offer that takes 1 EUR and gives 10 USD
405  // Bob spends 1 EUR and receives 10 USD.
406  //
407  // 2. The best quality is the autobridged offers that takes 2 EUR
408  // and gives 4 USD.
409  // Bob spends 600 EUR and receives 1200 USD.
410  //
411  // 3. The best quality is the autobridged offers that takes 2 EUR
412  // and gives 3 USD.
413  // a. One of Carol's offers is taken. This leaves her other
414  // offers unfunded.
415  // b. Carol's remaining 800 offers are consumed as unfunded.
416  // c. 199 of alice's XRP(1) to USD(3) offers are consumed.
417  // A book step is allowed to consume a maxium of 1000 offers
418  // at a given quality, and that limit is now reached.
419  // d. Now the strand is dry, even though there are still funded
420  // XRP(1) to USD(3) offers available. Bob has spent 400 EUR and
421  // received 600 USD in this step. (200 funded offers consumed
422  // 800 unfunded offers)
423  // 4. The best is the non-autobridged offers that takes 499 EUR and
424  // gives 499 USD.
425  // Bob has 2000 EUR, and has spent 1+600+400=1001 EUR. He has
426  // 999 left. Bob spent 499 EUR and receives 499 USD.
427  // In total: Bob spent EUR(1 + 600 + 400 + 499) = EUR(1500). He
428  // started with 2000 so has 500 remaining
429  // Bob received USD(10 + 1200 + 600 + 499) = USD(2309).
430  // Alice spent 10 + 300*4 + 199*3 + 499 = 2306 USD. She
431  // started with 4000 so has 1704 USD remaining. Alice
432  // received 600 + 400 + 500 = 1500 EUR
433  env.trust(EUR(10000), bob);
434  env.close();
435  env(pay(gw, bob, EUR(2000)));
436  env.close();
437  env(offer(bob, USD(4000), EUR(4000)));
438  env.close();
439 
440  env.require(balance(bob, USD(2309)));
441  env.require(balance(bob, EUR(500)));
442  env.require(offers(bob, 1));
443  env.require(owners(bob, 3));
444 
445  env.require(balance(alice, USD(1694)));
446  env.require(balance(alice, EUR(1500)));
447  auto const numAOffers =
448  1 + 2000 + 300 + 1000 + 1 - (1 + 2 * 300 + 2 * 199 + 1 + 1);
449  env.require(offers(alice, numAOffers));
450  env.require(owners(alice, numAOffers + 2));
451 
452  env.require(offers(carol, 0));
453  }
454  }
455 
457  {
458  // Taker and FlowCross are too different in the way they handle
459  // autobridging to make one test suit both approaches.
460  //
461  // o Taker alternates between books, completing one full increment
462  // before returning to make another pass.
463  //
464  // o FlowCross extracts as much as possible in one book at one Quality
465  // before proceeding to the other book. This reduces the number of
466  // times we change books.
467  //
468  // So the tests for the two forms of autobridging are separate.
469  if (features[featureFlowCross])
471  else
472  testAutoBridgedLimitsTaker (features);
473  }
474 
475  void
477  {
478  testcase("Offer Overflow");
479 
480  using namespace jtx;
481 
482  auto const gw = Account("gateway");
483  auto const alice = Account("alice");
484  auto const bob = Account("bob");
485 
486  auto const USD = gw["USD"];
487 
488  Env env(*this, features);
489 
490  env.fund(XRP(100000000), gw, alice, bob);
491 
492  env.trust(USD(8000), alice);
493  env.trust(USD(8000), bob);
494  env.close();
495 
496  env(pay(gw, alice, USD(8000)));
497  env.close();
498 
499  // The new flow cross handles consuming excessive offers differently than the old
500  // offer crossing code. In the old code, the total number of consumed offers is tracked, and
501  // the crossings will stop after this limit is hit. In the new code, the number of offers is
502  // tracked per offerbook and per quality. This test shows how they can differ. Set up a book
503  // with many offers. At each quality keep the number of offers below the limit. However, if
504  // all the offers are consumed it would create a tecOVERSIZE error.
505  n_offers(env, 998, alice, XRP(1.00), USD(1));
506  n_offers(env, 998, alice, XRP(0.99), USD(1));
507  n_offers(env, 998, alice, XRP(0.98), USD(1));
508  n_offers(env, 998, alice, XRP(0.97), USD(1));
509  n_offers(env, 998, alice, XRP(0.96), USD(1));
510  n_offers(env, 998, alice, XRP(0.95), USD(1));
511 
512  bool const withFlowCross = features[featureFlowCross];
513  env(offer(bob, USD(8000), XRP(8000)), ter(withFlowCross ? TER{tecOVERSIZE} : tesSUCCESS));
514  env.close();
515 
516  env.require(balance(bob, USD(withFlowCross ? 0 : 850)));
517  }
518 
519  void
520  run() override
521  {
522  auto testAll = [this](FeatureBitset features) {
523  testStepLimit(features);
524  testCrossingLimit(features);
525  testStepAndCrossingLimit(features);
526  testAutoBridgedLimits(features);
527  testOfferOverflow(features);
528  };
529  using namespace jtx;
530  auto const sa = supported_amendments();
531  testAll(sa - featureFlowCross);
532  testAll(sa );
533  }
534 };
535 
536 BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(CrossingLimits,tx,ripple,10);
537 
538 } // test
539 } // ripple
ripple::test::jtx::XRP
const XRP_t XRP
Converts to XRP Issue or STAmount.
Definition: amount.cpp:109
ripple::test::jtx::ter
Set the expected result code for a JTx The test will fail if the code doesn't match.
Definition: ter.h:33
ripple::test::jtx::owners
Match the number of items in the account's owner directory.
Definition: owners.h:73
ripple::test::jtx::Env::require
void require(Args const &... args)
Check a set of requirements.
Definition: Env.h:461
ripple::test::jtx::balance
A balance matches.
Definition: balance.h:38
ripple::CashFilter::none
@ none
ripple::QualityDirection::in
@ in
ripple::test::jtx::offer
Json::Value offer(Account const &account, STAmount const &in, STAmount const &out, std::uint32_t flags)
Create an offer.
Definition: offer.cpp:28
ripple::sfOwnerCount
const SF_U32 sfOwnerCount(access, STI_UINT32, 13, "OwnerCount")
Definition: SField.h:349
ripple::test::jtx::Env::trust
void trust(STAmount const &amount, Account const &account)
Establish trust lines.
Definition: Env.cpp:245
ripple::tecOVERSIZE
@ tecOVERSIZE
Definition: TER.h:276
ripple::test::BEAST_DEFINE_TESTSUITE_MANUAL_PRIO
BEAST_DEFINE_TESTSUITE_MANUAL_PRIO(CrossingLimits, tx, ripple, 10)
ripple::QualityDirection::out
@ out
ripple::test::CrossingLimits_test::testAutoBridgedLimits
void testAutoBridgedLimits(FeatureBitset features)
Definition: CrossingLimits_test.cpp:456
ripple::TERSubset< CanCvtToTER >
ripple::test::CrossingLimits_test::n_offers
void n_offers(jtx::Env &env, std::size_t n, jtx::Account const &account, STAmount const &in, STAmount const &out)
Definition: CrossingLimits_test.cpp:29
ripple::STAmount
Definition: STAmount.h:42
ripple::test::CrossingLimits_test::testCrossingLimit
void testCrossingLimit(FeatureBitset features)
Definition: CrossingLimits_test.cpp:89
ripple::test::jtx::supported_amendments
FeatureBitset supported_amendments()
Definition: Env.h:71
ripple::test::CrossingLimits_test::testStepAndCrossingLimit
void testStepAndCrossingLimit(FeatureBitset features)
Definition: CrossingLimits_test.cpp:129
ripple::test::CrossingLimits_test::run
void run() override
Definition: CrossingLimits_test.cpp:520
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::test::CrossingLimits_test
Definition: CrossingLimits_test.cpp:25
ripple::test::jtx::pay
Json::Value pay(Account const &account, Account const &to, AnyAmount amount)
Create a payment.
Definition: pay.cpp:29
ripple::test::CrossingLimits_test::testStepLimit
void testStepLimit(FeatureBitset features)
Definition: CrossingLimits_test.cpp:49
ripple::test::jtx::Env::close
void close(NetClock::time_point closeTime, boost::optional< std::chrono::milliseconds > consensusDelay=boost::none)
Close and advance the ledger.
Definition: Env.cpp:114
ripple::test::jtx::Env::fund
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
Definition: Env.cpp:214
ripple::test::jtx::Env::le
std::shared_ptr< SLE const > le(Account const &account) const
Return an account root.
Definition: Env.cpp:202
ripple::FeatureBitset
Definition: Feature.h:153
std::size_t
ripple::test::jtx::Account
Immutable cryptographic account descriptor.
Definition: Account.h:37
ripple::test::CrossingLimits_test::testAutoBridgedLimitsTaker
void testAutoBridgedLimitsTaker(FeatureBitset features)
Definition: CrossingLimits_test.cpp:193
ripple::test::CrossingLimits_test::testOfferOverflow
void testOfferOverflow(FeatureBitset features)
Definition: CrossingLimits_test.cpp:476
ripple::featureFlowCross
const uint256 featureFlowCross
Definition: Feature.cpp:161
ripple::tesSUCCESS
@ tesSUCCESS
Definition: TER.h:219
ripple::test::jtx::Env
A transaction testing environment.
Definition: Env.h:117
ripple::test::CrossingLimits_test::testAutoBridgedLimitsFlowCross
void testAutoBridgedLimitsFlowCross(FeatureBitset features)
Definition: CrossingLimits_test.cpp:289
ripple::test::jtx::owner_count
Definition: owners.h:50