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  std::string const locator =
262  "9633EC8AF54F16B5286DB1D7B519EF49EEFC050C0C8AC4384F1D88ACD1BFDF05";
263  jt[sfWalletLocator.fieldName] = locator;
264  env(jt);
265  BEAST_EXPECT(to_string((*env.le(alice))[sfWalletLocator]) == locator);
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  std::string const mh("5F31A79367DC3137FADA860C05742EE6");
284  jt[sfEmailHash.fieldName] = mh;
285  env(jt);
286  BEAST_EXPECT(to_string((*env.le(alice))[sfEmailHash]) == mh);
287 
288  jt[sfEmailHash.fieldName] = "";
289  env(jt);
290  BEAST_EXPECT(!env.le(alice)->isFieldPresent(sfEmailHash));
291  }
292 
293  void
295  {
296  struct test_results
297  {
298  double set;
299  TER code;
300  double get;
301  };
302 
303  testcase("TransferRate");
304 
305  using namespace test::jtx;
306  auto doTests = [this](
307  FeatureBitset const& features,
309  Env env(*this, features);
310 
311  Account const alice("alice");
312  env.fund(XRP(10000), alice);
313 
314  for (auto const& r : testData)
315  {
316  env(rate(alice, r.set), ter(r.code));
317  env.close();
318 
319  // If the field is not present expect the default value
320  if (!(*env.le(alice))[~sfTransferRate])
321  BEAST_EXPECT(r.get == 1.0);
322  else
323  BEAST_EXPECT(
324  *(*env.le(alice))[~sfTransferRate] ==
325  r.get * QUALITY_ONE);
326  }
327  };
328 
329  doTests(
330  supported_amendments(),
331  {{1.0, tesSUCCESS, 1.0},
332  {1.1, tesSUCCESS, 1.1},
333  {2.0, tesSUCCESS, 2.0},
334  {2.1, temBAD_TRANSFER_RATE, 2.0},
335  {0.0, tesSUCCESS, 1.0},
336  {2.0, tesSUCCESS, 2.0},
337  {0.9, temBAD_TRANSFER_RATE, 2.0}});
338  }
339 
340  void
342  {
343  testcase("Gateway");
344 
345  using namespace test::jtx;
346 
347  Account const alice("alice");
348  Account const bob("bob");
349  Account const gw("gateway");
350  auto const USD = gw["USD"];
351 
352  // Test gateway with a variety of allowed transfer rates
353  for (double transferRate = 1.0; transferRate <= 2.0;
354  transferRate += 0.03125)
355  {
356  Env env(*this);
357  env.fund(XRP(10000), gw, alice, bob);
358  env.close();
359  env.trust(USD(10), alice, bob);
360  env.close();
361  env(rate(gw, transferRate));
362  env.close();
363 
364  auto const amount = USD(1);
365  Rate const rate(transferRate * QUALITY_ONE);
366  auto const amountWithRate =
367  toAmount<STAmount>(multiply(amount.value(), rate));
368 
369  env(pay(gw, alice, USD(10)));
370  env.close();
371  env(pay(alice, bob, USD(1)), sendmax(USD(10)));
372  env.close();
373 
374  env.require(balance(alice, USD(10) - amountWithRate));
375  env.require(balance(bob, USD(1)));
376  }
377 
378  // Since fix1201 was enabled on Nov 14 2017 a rate in excess of
379  // 2.0 has been blocked by the transactor. But there are a few
380  // accounts on the MainNet that have larger-than-currently-allowed
381  // TransferRates. We'll bypass the transactor so we can check
382  // operation of these legacy TransferRates.
383  //
384  // Two out-of-bound values are currently in the ledger (March 2020)
385  // They are 4.0 and 4.294967295. So those are the values we test.
386  for (double transferRate : {4.0, 4.294967295})
387  {
388  Env env(*this);
389  env.fund(XRP(10000), gw, alice, bob);
390  env.close();
391  env.trust(USD(10), alice, bob);
392  env.close();
393 
394  // We'd like to use transferRate here, but the transactor
395  // blocks transfer rates that large. So we use an acceptable
396  // transfer rate here and later hack the ledger to replace
397  // the acceptable value with an out-of-bounds value.
398  env(rate(gw, 2.0));
399  env.close();
400 
401  // Note that we're bypassing almost all of the ledger's safety
402  // checks with this modify() call. If you call close() between
403  // here and the end of the test all the effort will be lost.
404  env.app().openLedger().modify(
405  [&gw, transferRate](OpenView& view, beast::Journal j) {
406  // Get the account root we want to hijack.
407  auto const sle = view.read(keylet::account(gw.id()));
408  if (!sle)
409  return false; // This would be really surprising!
410 
411  // We'll insert a replacement for the account root
412  // with the higher (currently invalid) transfer rate.
413  auto replacement = std::make_shared<SLE>(*sle, sle->key());
414  (*replacement)[sfTransferRate] =
415  static_cast<std::uint32_t>(transferRate * QUALITY_ONE);
416  view.rawReplace(replacement);
417  return true;
418  });
419 
420  auto const amount = USD(1);
421  auto const amountWithRate = toAmount<STAmount>(
422  multiply(amount.value(), Rate(transferRate * QUALITY_ONE)));
423 
424  env(pay(gw, alice, USD(10)));
425  env(pay(alice, bob, amount), sendmax(USD(10)));
426 
427  env.require(balance(alice, USD(10) - amountWithRate));
428  env.require(balance(bob, amount));
429  }
430  }
431 
432  void
434  {
435  testcase("Bad inputs");
436 
437  using namespace test::jtx;
438  Env env(*this);
439  Account const alice("alice");
440  env.fund(XRP(10000), alice);
441 
442  auto jt = fset(alice, asfDisallowXRP);
443  jt[jss::ClearFlag] = asfDisallowXRP;
444  env(jt, ter(temINVALID_FLAG));
445 
446  jt = fset(alice, asfRequireAuth);
447  jt[jss::ClearFlag] = asfRequireAuth;
448  env(jt, ter(temINVALID_FLAG));
449 
450  jt = fset(alice, asfRequireDest);
451  jt[jss::ClearFlag] = asfRequireDest;
452  env(jt, ter(temINVALID_FLAG));
453 
454  jt = fset(alice, asfDisallowXRP);
456  env(jt, ter(temINVALID_FLAG));
457 
458  jt = fset(alice, asfRequireAuth);
460  env(jt, ter(temINVALID_FLAG));
461 
462  jt = fset(alice, asfRequireDest);
464  env(jt, ter(temINVALID_FLAG));
465 
466  jt = fset(alice, asfRequireDest);
468  env(jt, ter(temINVALID_FLAG));
469 
470  env(fset(alice, asfDisableMaster),
471  sig(alice),
472  ter(tecNO_ALTERNATIVE_KEY));
473  }
474 
475  void
477  {
478  testcase("Require auth");
479 
480  using namespace test::jtx;
481  Env env(*this);
482  Account const alice("alice");
483  Account const bob("bob");
484 
485  env.fund(XRP(10000), alice);
486  env.close();
487 
488  // alice should have an empty directory.
489  BEAST_EXPECT(dirIsEmpty(*env.closed(), keylet::ownerDir(alice)));
490 
491  // Give alice a signer list, then there will be stuff in the directory.
492  env(signers(alice, 1, {{bob, 1}}));
493  env.close();
494  BEAST_EXPECT(!dirIsEmpty(*env.closed(), keylet::ownerDir(alice)));
495 
496  env(fset(alice, asfRequireAuth), ter(tecOWNERS));
497 
498  // Remove the signer list. After that asfRequireAuth should succeed.
499  env(signers(alice, test::jtx::none));
500  env.close();
501  BEAST_EXPECT(dirIsEmpty(*env.closed(), keylet::ownerDir(alice)));
502 
503  env(fset(alice, asfRequireAuth));
504  }
505 
506  void
508  {
509  using namespace test::jtx;
510  Env env(*this);
511  Account const alice("alice");
512 
513  env.fund(XRP(10000), alice);
514  env.close();
515 
516  std::uint32_t const ticketSeq{env.seq(alice) + 1};
517  env(ticket::create(alice, 1));
518  env.close();
519  env.require(owners(alice, 1), tickets(alice, 1));
520 
521  // Try using a ticket that alice doesn't have.
522  env(noop(alice), ticket::use(ticketSeq + 1), ter(terPRE_TICKET));
523  env.close();
524  env.require(owners(alice, 1), tickets(alice, 1));
525 
526  // Actually use alice's ticket. Note that if a transaction consumes
527  // a ticket then the account's sequence number does not advance.
528  std::uint32_t const aliceSeq{env.seq(alice)};
529  env(noop(alice), ticket::use(ticketSeq));
530  env.close();
531  env.require(owners(alice, 0), tickets(alice, 0));
532  BEAST_EXPECT(aliceSeq == env.seq(alice));
533 
534  // Try re-using a ticket that alice already used.
535  env(noop(alice), ticket::use(ticketSeq), ter(tefNO_TICKET));
536  env.close();
537  }
538 
539  void
540  run() override
541  {
543  testMostFlags();
545  testSetNoFreeze();
546  testDomain();
547  testGateway();
548  testMessageKey();
549  testWalletID();
550  testEmailHash();
551  testBadInputs();
554  testTicket();
555  }
556 };
557 
558 BEAST_DEFINE_TESTSUITE(AccountSet, app, ripple);
559 
560 } // namespace ripple
ripple::keylet::ownerDir
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Definition: Indexes.cpp:300
ripple::tefNO_TICKET
@ tefNO_TICKET
Definition: TER.h:163
ripple::transferRate
Rate transferRate(ReadView const &view, AccountID const &issuer)
Definition: View.cpp:351
ripple::terPRE_TICKET
@ terPRE_TICKET
Definition: TER.h:202
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:507
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:260
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:55
ripple::asfGlobalFreeze
const std::uint32_t asfGlobalFreeze
Definition: TxFlags.h:71
std::find
T find(T... args)
ripple::sfWalletLocator
const SF_HASH256 sfWalletLocator
std::string::length
T length(T... args)
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::featureDepositAuth
const uint256 featureDepositAuth
Definition: Feature.cpp:172
ripple::asfDepositAuth
const std::uint32_t asfDepositAuth
Definition: TxFlags.h:73
ripple::sfEmailHash
const SF_HASH128 sfEmailHash
ripple::asfDisallowXRP
const std::uint32_t asfDisallowXRP
Definition: TxFlags.h:67
ripple::tfOptionalDestTag
const std::uint32_t tfOptionalDestTag
Definition: TxFlags.h:55
ripple::temBAD_TRANSFER_RATE
@ temBAD_TRANSFER_RATE
Definition: TER.h:102
ripple::AccountSet_test::testGateway
void testGateway()
Definition: AccountSet_test.cpp:341
ripple::asfAccountTxnID
const std::uint32_t asfAccountTxnID
Definition: TxFlags.h:69
ripple::KeyType::ed25519
@ ed25519
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:476
ripple::tecNO_ALTERNATIVE_KEY
@ tecNO_ALTERNATIVE_KEY
Definition: TER.h:258
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:130
ripple::AccountSet_test::run
void run() override
Definition: AccountSet_test.cpp:540
ripple::OpenView::rawReplace
void rawReplace(std::shared_ptr< SLE > const &sle) override
Unconditionally replace a state item.
Definition: OpenView.cpp:245
ripple::TERSubset< CanCvtToTER >
ripple::AccountSet_test::testTransferRate
void testTransferRate()
Definition: AccountSet_test.cpp:294
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
ripple::sfTransferRate
const SF_UINT32 sfTransferRate
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:270
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:368
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:470
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:433
ripple::tfOptionalAuth
const std::uint32_t tfOptionalAuth
Definition: TxFlags.h:57
ripple::sfAccountTxnID
const SF_HASH256 sfAccountTxnID
ripple::AccountSet_test::testSetNoFreeze
void testSetNoFreeze()
Definition: AccountSet_test.cpp:153
ripple::sfFlags
const SF_UINT32 sfFlags
ripple::FeatureBitset
Definition: Feature.h:160
ripple::tfAccountSetMask
const std::uint32_t tfAccountSetMask
Definition: TxFlags.h:60
ripple::telBAD_PUBLIC_KEY
@ telBAD_PUBLIC_KEY
Definition: TER.h:54
ripple::sfMessageKey
const SF_VL sfMessageKey
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:171
std::size_t
ripple::to_string
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
Definition: app/misc/impl/Manifest.cpp:39
ripple::strHex
std::string strHex(FwdIt begin, FwdIt end)
Definition: strHex.h:45
ripple::AccountSet_test::testMessageKey
void testMessageKey()
Definition: AccountSet_test.cpp:224
ripple::sfDomain
const SF_VL sfDomain
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:217
ripple::toAmount< STAmount >
STAmount toAmount< STAmount >(STAmount const &amt)
Definition: AmountConversions.h:70
ripple::get
T & get(EitherAmount &amt)
Definition: AmountSpec.h:118
ripple::AccountSet_test
Definition: AccountSet_test.cpp:30
std::initializer_list