rippled
AccountSet_test.cpp
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2016 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #include <ripple/basics/StringUtilities.h>
21 #include <ripple/protocol/AmountConversions.h>
22 #include <ripple/protocol/Feature.h>
23 #include <ripple/protocol/Quality.h>
24 #include <ripple/protocol/Rate.h>
25 #include <ripple/protocol/jss.h>
26 #include <test/jtx.h>
27 
28 namespace ripple {
29 
30 class AccountSet_test : public beast::unit_test::suite
31 {
32 public:
33  void
35  {
36  testcase("No AccountSet");
37 
38  using namespace test::jtx;
39  Env env(*this);
40  Account const alice("alice");
41  env.fund(XRP(10000), noripple(alice));
42  // ask for the ledger entry - account root, to check its flags
43  auto const jrr = env.le(alice);
44  BEAST_EXPECT((*env.le(alice))[sfFlags] == 0u);
45  }
46 
47  void
49  {
50  testcase("Most Flags");
51 
52  using namespace test::jtx;
53  Account const alice("alice");
54 
55  // Test without DepositAuth enabled initially.
56  Env env(*this, supported_amendments() - featureDepositAuth);
57  env.fund(XRP(10000), noripple(alice));
58 
59  // Give alice a regular key so she can legally set and clear
60  // her asfDisableMaster flag.
61  Account const alie{"alie", KeyType::secp256k1};
62  env(regkey(alice, alie));
63  env.close();
64 
65  auto testFlags = [this, &alice, &alie, &env](
67  std::uint32_t const orig_flags = (*env.le(alice))[sfFlags];
68  for (std::uint32_t flag{1u};
69  flag < std::numeric_limits<std::uint32_t>::digits;
70  ++flag)
71  {
72  if (flag == asfNoFreeze)
73  {
74  // The asfNoFreeze flag can't be cleared. It is tested
75  // elsewhere.
76  continue;
77  }
78  else if (
79  std::find(goodFlags.begin(), goodFlags.end(), flag) !=
80  goodFlags.end())
81  {
82  // Good flag
83  env.require(nflags(alice, flag));
84  env(fset(alice, flag), sig(alice));
85  env.close();
86  env.require(flags(alice, flag));
87  env(fclear(alice, flag), sig(alie));
88  env.close();
89  env.require(nflags(alice, flag));
90  std::uint32_t const now_flags = (*env.le(alice))[sfFlags];
91  BEAST_EXPECT(now_flags == orig_flags);
92  }
93  else
94  {
95  // Bad flag
96  BEAST_EXPECT((*env.le(alice))[sfFlags] == orig_flags);
97  env(fset(alice, flag), sig(alice));
98  env.close();
99  BEAST_EXPECT((*env.le(alice))[sfFlags] == orig_flags);
100  env(fclear(alice, flag), sig(alie));
101  env.close();
102  BEAST_EXPECT((*env.le(alice))[sfFlags] == orig_flags);
103  }
104  }
105  };
106 
107  // Test with featureDepositAuth disabled.
108  testFlags(
115 
116  // Enable featureDepositAuth and retest.
117  env.enableFeature(featureDepositAuth);
118  env.close();
119  testFlags(
126  asfDepositAuth});
127  }
128 
129  void
131  {
132  testcase("Set and reset AccountTxnID");
133 
134  using namespace test::jtx;
135  Env env(*this);
136  Account const alice("alice");
137  env.fund(XRP(10000), noripple(alice));
138 
139  std::uint32_t const orig_flags = (*env.le(alice))[sfFlags];
140 
141  // asfAccountTxnID is special and not actually set as a flag,
142  // so we check the field presence instead
143  BEAST_EXPECT(!env.le(alice)->isFieldPresent(sfAccountTxnID));
144  env(fset(alice, asfAccountTxnID), sig(alice));
145  BEAST_EXPECT(env.le(alice)->isFieldPresent(sfAccountTxnID));
146  env(fclear(alice, asfAccountTxnID));
147  BEAST_EXPECT(!env.le(alice)->isFieldPresent(sfAccountTxnID));
148  std::uint32_t const now_flags = (*env.le(alice))[sfFlags];
149  BEAST_EXPECT(now_flags == orig_flags);
150  }
151 
152  void
154  {
155  testcase("Set NoFreeze");
156 
157  using namespace test::jtx;
158  Env env(*this);
159  Account const alice("alice");
160  env.fund(XRP(10000), noripple(alice));
161  env.memoize("eric");
162  env(regkey(alice, "eric"));
163 
164  env.require(nflags(alice, asfNoFreeze));
165  env(fset(alice, asfNoFreeze), sig("eric"), ter(tecNEED_MASTER_KEY));
166  env(fset(alice, asfNoFreeze), sig(alice));
167  env.require(flags(alice, asfNoFreeze));
168  env(fclear(alice, asfNoFreeze), sig(alice));
169  // verify flag is still set (clear does not clear in this case)
170  env.require(flags(alice, asfNoFreeze));
171  }
172 
173  void
175  {
176  testcase("Domain");
177 
178  using namespace test::jtx;
179  Env env(*this);
180  Account const alice("alice");
181  env.fund(XRP(10000), alice);
182  auto jt = noop(alice);
183  // The Domain field is represented as the hex string of the lowercase
184  // ASCII of the domain. For example, the domain example.com would be
185  // represented as "6578616d706c652e636f6d".
186  //
187  // To remove the Domain field from an account, send an AccountSet with
188  // the Domain set to an empty string.
189  std::string const domain = "example.com";
190  jt[sfDomain.fieldName] = strHex(domain);
191  env(jt);
192  BEAST_EXPECT((*env.le(alice))[sfDomain] == makeSlice(domain));
193 
194  jt[sfDomain.fieldName] = "";
195  env(jt);
196  BEAST_EXPECT(!env.le(alice)->isFieldPresent(sfDomain));
197 
198  // The upper limit on the length is 256 bytes
199  // (defined as DOMAIN_BYTES_MAX in SetAccount)
200  // test the edge cases: 255, 256, 257.
201  std::size_t const maxLength = 256;
202  for (std::size_t len = maxLength - 1; len <= maxLength + 1; ++len)
203  {
204  std::string domain2 =
205  std::string(len - domain.length() - 1, 'a') + "." + domain;
206 
207  BEAST_EXPECT(domain2.length() == len);
208 
209  jt[sfDomain.fieldName] = strHex(domain2);
210 
211  if (len <= maxLength)
212  {
213  env(jt);
214  BEAST_EXPECT((*env.le(alice))[sfDomain] == makeSlice(domain2));
215  }
216  else
217  {
218  env(jt, ter(telBAD_DOMAIN));
219  }
220  }
221  }
222 
223  void
225  {
226  testcase("MessageKey");
227 
228  using namespace test::jtx;
229  Env env(*this);
230  Account const alice("alice");
231  env.fund(XRP(10000), alice);
232  auto jt = noop(alice);
233 
234  auto const rkp = randomKeyPair(KeyType::ed25519);
235  jt[sfMessageKey.fieldName] = strHex(rkp.first.slice());
236  env(jt);
237  BEAST_EXPECT(
238  strHex((*env.le(alice))[sfMessageKey]) ==
239  strHex(rkp.first.slice()));
240 
241  jt[sfMessageKey.fieldName] = "";
242  env(jt);
243  BEAST_EXPECT(!env.le(alice)->isFieldPresent(sfMessageKey));
244 
245  using namespace std::string_literals;
246  jt[sfMessageKey.fieldName] = strHex("NOT_REALLY_A_PUBKEY"s);
247  env(jt, ter(telBAD_PUBLIC_KEY));
248  }
249 
250  void
252  {
253  testcase("WalletID");
254 
255  using namespace test::jtx;
256  Env env(*this);
257  Account const alice("alice");
258  env.fund(XRP(10000), alice);
259  auto jt = noop(alice);
260 
261  uint256 somehash = from_hex_text<uint256>(
262  "9633ec8af54f16b5286db1d7b519ef49eefc050c0c8ac4384f1d88acd1bfdf05");
263  jt[sfWalletLocator.fieldName] = to_string(somehash);
264  env(jt);
265  BEAST_EXPECT((*env.le(alice))[sfWalletLocator] == somehash);
266 
267  jt[sfWalletLocator.fieldName] = "";
268  env(jt);
269  BEAST_EXPECT(!env.le(alice)->isFieldPresent(sfWalletLocator));
270  }
271 
272  void
274  {
275  testcase("EmailHash");
276 
277  using namespace test::jtx;
278  Env env(*this);
279  Account const alice("alice");
280  env.fund(XRP(10000), alice);
281  auto jt = noop(alice);
282 
283  uint128 somehash =
284  from_hex_text<uint128>("fff680681c2f5e6095324e2e08838f221a72ab4f");
285  jt[sfEmailHash.fieldName] = to_string(somehash);
286  env(jt);
287  BEAST_EXPECT((*env.le(alice))[sfEmailHash] == somehash);
288 
289  jt[sfEmailHash.fieldName] = "";
290  env(jt);
291  BEAST_EXPECT(!env.le(alice)->isFieldPresent(sfEmailHash));
292  }
293 
294  void
296  {
297  struct test_results
298  {
299  double set;
300  TER code;
301  double get;
302  };
303 
304  testcase("TransferRate");
305 
306  using namespace test::jtx;
307  auto doTests = [this](
308  FeatureBitset const& features,
310  Env env(*this, features);
311 
312  Account const alice("alice");
313  env.fund(XRP(10000), alice);
314 
315  for (auto const& r : testData)
316  {
317  env(rate(alice, r.set), ter(r.code));
318  env.close();
319 
320  // If the field is not present expect the default value
321  if (!(*env.le(alice))[~sfTransferRate])
322  BEAST_EXPECT(r.get == 1.0);
323  else
324  BEAST_EXPECT(
325  *(*env.le(alice))[~sfTransferRate] ==
326  r.get * QUALITY_ONE);
327  }
328  };
329 
330  doTests(
331  supported_amendments(),
332  {{1.0, tesSUCCESS, 1.0},
333  {1.1, tesSUCCESS, 1.1},
334  {2.0, tesSUCCESS, 2.0},
335  {2.1, temBAD_TRANSFER_RATE, 2.0},
336  {0.0, tesSUCCESS, 1.0},
337  {2.0, tesSUCCESS, 2.0},
338  {0.9, temBAD_TRANSFER_RATE, 2.0}});
339  }
340 
341  void
343  {
344  testcase("Gateway");
345 
346  using namespace test::jtx;
347 
348  Account const alice("alice");
349  Account const bob("bob");
350  Account const gw("gateway");
351  auto const USD = gw["USD"];
352 
353  // Test gateway with a variety of allowed transfer rates
354  for (double transferRate = 1.0; transferRate <= 2.0;
355  transferRate += 0.03125)
356  {
357  Env env(*this);
358  env.fund(XRP(10000), gw, alice, bob);
359  env.close();
360  env.trust(USD(10), alice, bob);
361  env.close();
362  env(rate(gw, transferRate));
363  env.close();
364 
365  auto const amount = USD(1);
366  Rate const rate(transferRate * QUALITY_ONE);
367  auto const amountWithRate =
368  toAmount<STAmount>(multiply(amount.value(), rate));
369 
370  env(pay(gw, alice, USD(10)));
371  env.close();
372  env(pay(alice, bob, USD(1)), sendmax(USD(10)));
373  env.close();
374 
375  env.require(balance(alice, USD(10) - amountWithRate));
376  env.require(balance(bob, USD(1)));
377  }
378 
379  // Since fix1201 was enabled on Nov 14 2017 a rate in excess of
380  // 2.0 has been blocked by the transactor. But there are a few
381  // accounts on the MainNet that have larger-than-currently-allowed
382  // TransferRates. We'll bypass the transactor so we can check
383  // operation of these legacy TransferRates.
384  //
385  // Two out-of-bound values are currently in the ledger (March 2020)
386  // They are 4.0 and 4.294967295. So those are the values we test.
387  for (double transferRate : {4.0, 4.294967295})
388  {
389  Env env(*this);
390  env.fund(XRP(10000), gw, alice, bob);
391  env.close();
392  env.trust(USD(10), alice, bob);
393  env.close();
394 
395  // We'd like to use transferRate here, but the transactor
396  // blocks transfer rates that large. So we use an acceptable
397  // transfer rate here and later hack the ledger to replace
398  // the acceptable value with an out-of-bounds value.
399  env(rate(gw, 2.0));
400  env.close();
401 
402  // Note that we're bypassing almost all of the ledger's safety
403  // checks with this modify() call. If you call close() between
404  // here and the end of the test all the effort will be lost.
405  env.app().openLedger().modify(
406  [&gw, transferRate](OpenView& view, beast::Journal j) {
407  // Get the account root we want to hijack.
408  auto const sle = view.read(keylet::account(gw.id()));
409  if (!sle)
410  return false; // This would be really surprising!
411 
412  // We'll insert a replacement for the account root
413  // with the higher (currently invalid) transfer rate.
414  auto replacement = std::make_shared<SLE>(*sle, sle->key());
415  (*replacement)[sfTransferRate] =
416  static_cast<std::uint32_t>(transferRate * QUALITY_ONE);
417  view.rawReplace(replacement);
418  return true;
419  });
420 
421  auto const amount = USD(1);
422  auto const amountWithRate = toAmount<STAmount>(
423  multiply(amount.value(), Rate(transferRate * QUALITY_ONE)));
424 
425  env(pay(gw, alice, USD(10)));
426  env(pay(alice, bob, amount), sendmax(USD(10)));
427 
428  env.require(balance(alice, USD(10) - amountWithRate));
429  env.require(balance(bob, amount));
430  }
431  }
432 
433  void
435  {
436  testcase("Bad inputs");
437 
438  using namespace test::jtx;
439  Env env(*this);
440  Account const alice("alice");
441  env.fund(XRP(10000), alice);
442 
443  auto jt = fset(alice, asfDisallowXRP);
444  jt[jss::ClearFlag] = asfDisallowXRP;
445  env(jt, ter(temINVALID_FLAG));
446 
447  jt = fset(alice, asfRequireAuth);
448  jt[jss::ClearFlag] = asfRequireAuth;
449  env(jt, ter(temINVALID_FLAG));
450 
451  jt = fset(alice, asfRequireDest);
452  jt[jss::ClearFlag] = asfRequireDest;
453  env(jt, ter(temINVALID_FLAG));
454 
455  jt = fset(alice, asfDisallowXRP);
457  env(jt, ter(temINVALID_FLAG));
458 
459  jt = fset(alice, asfRequireAuth);
461  env(jt, ter(temINVALID_FLAG));
462 
463  jt = fset(alice, asfRequireDest);
465  env(jt, ter(temINVALID_FLAG));
466 
467  jt = fset(alice, asfRequireDest);
469  env(jt, ter(temINVALID_FLAG));
470 
471  env(fset(alice, asfDisableMaster),
472  sig(alice),
473  ter(tecNO_ALTERNATIVE_KEY));
474  }
475 
476  void
478  {
479  testcase("Require auth");
480 
481  using namespace test::jtx;
482  Env env(*this);
483  Account const alice("alice");
484  Account const bob("bob");
485 
486  env.fund(XRP(10000), alice);
487  env.close();
488 
489  // alice should have an empty directory.
490  BEAST_EXPECT(dirIsEmpty(*env.closed(), keylet::ownerDir(alice)));
491 
492  // Give alice a signer list, then there will be stuff in the directory.
493  env(signers(alice, 1, {{bob, 1}}));
494  env.close();
495  BEAST_EXPECT(!dirIsEmpty(*env.closed(), keylet::ownerDir(alice)));
496 
497  env(fset(alice, asfRequireAuth), ter(tecOWNERS));
498 
499  // Remove the signer list. After that asfRequireAuth should succeed.
500  env(signers(alice, test::jtx::none));
501  env.close();
502  BEAST_EXPECT(dirIsEmpty(*env.closed(), keylet::ownerDir(alice)));
503 
504  env(fset(alice, asfRequireAuth));
505  }
506 
507  void
509  {
510  using namespace test::jtx;
511  Env env(*this, supported_amendments() | featureTicketBatch);
512  Account const alice("alice");
513 
514  env.fund(XRP(10000), alice);
515  env.close();
516 
517  std::uint32_t const ticketSeq{env.seq(alice) + 1};
518  env(ticket::create(alice, 1));
519  env.close();
520  env.require(owners(alice, 1), tickets(alice, 1));
521 
522  // Try using a ticket that alice doesn't have.
523  env(noop(alice), ticket::use(ticketSeq + 1), ter(terPRE_TICKET));
524  env.close();
525  env.require(owners(alice, 1), tickets(alice, 1));
526 
527  // Actually use alice's ticket. Note that if a transaction consumes
528  // a ticket then the account's sequence number does not advance.
529  std::uint32_t const aliceSeq{env.seq(alice)};
530  env(noop(alice), ticket::use(ticketSeq));
531  env.close();
532  env.require(owners(alice, 0), tickets(alice, 0));
533  BEAST_EXPECT(aliceSeq == env.seq(alice));
534 
535  // Try re-using a ticket that alice already used.
536  env(noop(alice), ticket::use(ticketSeq), ter(tefNO_TICKET));
537  env.close();
538  }
539 
540  void
541  run() override
542  {
544  testMostFlags();
546  testSetNoFreeze();
547  testDomain();
548  testGateway();
549  testMessageKey();
550  testWalletID();
551  testEmailHash();
552  testBadInputs();
555  testTicket();
556  }
557 };
558 
559 BEAST_DEFINE_TESTSUITE(AccountSet, app, ripple);
560 
561 } // namespace ripple
ripple::keylet::ownerDir
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition: Indexes.cpp:299
ripple::tefNO_TICKET
@ tefNO_TICKET
Definition: TER.h:162
ripple::transferRate
Rate transferRate(ReadView const &view, AccountID const &issuer)
Definition: View.cpp:347
ripple::terPRE_TICKET
@ terPRE_TICKET
Definition: TER.h:201
ripple::makeSlice
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
Definition: Slice.h:240
ripple::AccountSet_test::testTicket
void testTicket()
Definition: AccountSet_test.cpp:508
std::string
STL class.
ripple::test::jtx::none
static const none_t none
Definition: tags.h:34
ripple::BEAST_DEFINE_TESTSUITE
BEAST_DEFINE_TESTSUITE(AccountTxPaging, app, ripple)
ripple::Rate
Represents a transfer rate.
Definition: Rate.h:37
ripple::tecOWNERS
@ tecOWNERS
Definition: TER.h:259
ripple::AccountSet_test::testNullAccountSet
void testNullAccountSet()
Definition: AccountSet_test.cpp:34
ripple::OpenView
Writable ledger view that accumulates state and tx changes.
Definition: OpenView.h:52
ripple::asfGlobalFreeze
const std::uint32_t asfGlobalFreeze
Definition: TxFlags.h:71
std::find
T find(T... args)
std::string::length
T length(T... args)
ripple::sfMessageKey
const SF_Blob sfMessageKey(access, STI_VL, 2, "MessageKey")
Definition: SField.h:459
ripple::SField::fieldName
const std::string fieldName
Definition: SField.h:129
ripple::telBAD_DOMAIN
@ telBAD_DOMAIN
Definition: TER.h:52
ripple::asfDefaultRipple
const std::uint32_t asfDefaultRipple
Definition: TxFlags.h:72
ripple::sfFlags
const SF_U32 sfFlags(access, STI_UINT32, 2, "Flags")
Definition: SField.h:354
ripple::featureDepositAuth
const uint256 featureDepositAuth
Definition: Feature.cpp:169
ripple::sfWalletLocator
const SF_U256 sfWalletLocator(access, STI_HASH256, 7, "WalletLocator")
Definition: SField.h:425
ripple::asfDepositAuth
const std::uint32_t asfDepositAuth
Definition: TxFlags.h:73
ripple::asfDisallowXRP
const std::uint32_t asfDisallowXRP
Definition: TxFlags.h:67
ripple::tfOptionalDestTag
const std::uint32_t tfOptionalDestTag
Definition: TxFlags.h:55
ripple::to_string
std::string to_string(ListDisposition disposition)
Definition: ValidatorList.cpp:42
ripple::temBAD_TRANSFER_RATE
@ temBAD_TRANSFER_RATE
Definition: TER.h:102
ripple::AccountSet_test::testGateway
void testGateway()
Definition: AccountSet_test.cpp:342
ripple::asfAccountTxnID
const std::uint32_t asfAccountTxnID
Definition: TxFlags.h:69
ripple::sfAccountTxnID
const SF_U256 sfAccountTxnID(access, STI_HASH256, 9, "AccountTxnID")
Definition: SField.h:427
ripple::KeyType::ed25519
@ ed25519
ripple::base_uint< 256 >
ripple::temINVALID_FLAG
@ temINVALID_FLAG
Definition: TER.h:106
ripple::tfAllowXRP
const std::uint32_t tfAllowXRP
Definition: TxFlags.h:59
ripple::AccountSet_test::testRequireAuthWithDir
void testRequireAuthWithDir()
Definition: AccountSet_test.cpp:477
ripple::tecNO_ALTERNATIVE_KEY
@ tecNO_ALTERNATIVE_KEY
Definition: TER.h:257
ripple::AccountSet_test::testEmailHash
void testEmailHash()
Definition: AccountSet_test.cpp:273
ripple::asfRequireAuth
const std::uint32_t asfRequireAuth
Definition: TxFlags.h:66
ripple::keylet::account
Keylet account(AccountID const &id) noexcept
AccountID root.
Definition: Indexes.cpp:129
ripple::AccountSet_test::run
void run() override
Definition: AccountSet_test.cpp:541
ripple::OpenView::rawReplace
void rawReplace(std::shared_ptr< SLE > const &sle) override
Unconditionally replace a state item.
Definition: OpenView.cpp:222
ripple::TERSubset< CanCvtToTER >
ripple::AccountSet_test::testTransferRate
void testTransferRate()
Definition: AccountSet_test.cpp:295
ripple::set
bool set(T &target, std::string const &name, Section const &section)
Set a value from a configuration Section If the named value is not found or doesn't parse as a T,...
Definition: BasicConfig.h:276
beast::Journal
A generic endpoint for log messages.
Definition: Journal.h:58
std::uint32_t
ripple::AccountSet_test::testDomain
void testDomain()
Definition: AccountSet_test.cpp:174
ripple::tecNEED_MASTER_KEY
@ tecNEED_MASTER_KEY
Definition: TER.h:269
ripple::asfRequireDest
const std::uint32_t asfRequireDest
Definition: TxFlags.h:65
ripple::AccountSet_test::testMostFlags
void testMostFlags()
Definition: AccountSet_test.cpp:48
ripple::KeyType::secp256k1
@ secp256k1
ripple::multiply
STAmount multiply(STAmount const &amount, Rate const &rate)
Definition: Rate2.cpp:38
ripple::randomKeyPair
std::pair< PublicKey, SecretKey > randomKeyPair(KeyType type)
Create a key pair using secure random numbers.
Definition: SecretKey.cpp:260
ripple::asfDisableMaster
const std::uint32_t asfDisableMaster
Definition: TxFlags.h:68
ripple::dirIsEmpty
bool dirIsEmpty(ReadView const &view, Keylet const &k)
Returns true if the directory is empty.
Definition: View.cpp:466
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::asfNoFreeze
const std::uint32_t asfNoFreeze
Definition: TxFlags.h:70
ripple::AccountSet_test::testBadInputs
void testBadInputs()
Definition: AccountSet_test.cpp:434
ripple::tfOptionalAuth
const std::uint32_t tfOptionalAuth
Definition: TxFlags.h:57
ripple::AccountSet_test::testSetNoFreeze
void testSetNoFreeze()
Definition: AccountSet_test.cpp:153
ripple::FeatureBitset
Definition: Feature.h:156
ripple::tfAccountSetMask
const std::uint32_t tfAccountSetMask
Definition: TxFlags.h:60
ripple::telBAD_PUBLIC_KEY
@ telBAD_PUBLIC_KEY
Definition: TER.h:54
ripple::featureTicketBatch
const uint256 featureTicketBatch
Definition: Feature.cpp:189
ripple::OpenView::read
std::shared_ptr< SLE const > read(Keylet const &k) const override
Return the state item associated with a key.
Definition: OpenView.cpp:148
std::size_t
ripple::sfTransferRate
const SF_U32 sfTransferRate(access, STI_UINT32, 11, "TransferRate")
Definition: SField.h:363
ripple::strHex
std::string strHex(FwdIt begin, FwdIt end)
Definition: strHex.h:67
ripple::AccountSet_test::testMessageKey
void testMessageKey()
Definition: AccountSet_test.cpp:224
ripple::AccountSet_test::testSetAndResetAccountTxnID
void testSetAndResetAccountTxnID()
Definition: AccountSet_test.cpp:130
ripple::AccountSet_test::testWalletID
void testWalletID()
Definition: AccountSet_test.cpp:251
ripple::tesSUCCESS
@ tesSUCCESS
Definition: TER.h:216
ripple::sfEmailHash
const SF_U128 sfEmailHash(access, STI_HASH128, 1, "EmailHash")
Definition: SField.h:410
ripple::toAmount< STAmount >
STAmount toAmount< STAmount >(STAmount const &amt)
Definition: AmountConversions.h:74
ripple::get
T & get(EitherAmount &amt)
Definition: AmountSpec.h:116
ripple::AccountSet_test
Definition: AccountSet_test.cpp:30
std::initializer_list
ripple::sfDomain
const SF_Blob sfDomain(access, STI_VL, 7, "Domain")
Definition: SField.h:463