rippled
TER.h
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012 - 2019 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 #ifndef RIPPLE_PROTOCOL_TER_H_INCLUDED
21 #define RIPPLE_PROTOCOL_TER_H_INCLUDED
22 
23 #include <ripple/basics/safe_cast.h>
24 #include <ripple/json/json_value.h>
25 
26 #include <boost/optional.hpp>
27 #include <ostream>
28 #include <string>
29 
30 namespace ripple {
31 
32 // See https://xrpl.org/transaction-results.html
33 //
34 // "Transaction Engine Result"
35 // or Transaction ERror.
36 //
37 using TERUnderlyingType = int;
38 
39 //------------------------------------------------------------------------------
40 
42 {
43  // Note: Range is stable.
44  // Exact numbers are used in ripple-binary-codec:
45  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
46  // Use tokens.
47 
48  // -399 .. -300: L Local error (transaction fee inadequate, exceeds local limit)
49  // Only valid during non-consensus processing.
50  // Implications:
51  // - Not forwarded
52  // - No fee check
66 };
67 
68 //------------------------------------------------------------------------------
69 
71 {
72  // Note: Range is stable.
73  // Exact numbers are used in ripple-binary-codec:
74  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
75  // Use tokens.
76 
77  // -299 .. -200: M Malformed (bad signature)
78  // Causes:
79  // - Transaction corrupt.
80  // Implications:
81  // - Not applied
82  // - Not forwarded
83  // - Reject
84  // - Cannot succeed in any imagined ledger.
85  temMALFORMED = -299,
86 
119 
120  // An intermediate result used internally, should never be returned.
123 };
124 
125 //------------------------------------------------------------------------------
126 
128 {
129  // Note: Range is stable.
130  // Exact numbers are used in ripple-binary-codec:
131  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
132  // Use tokens.
133 
134  // -199 .. -100: F
135  // Failure (sequence number previously used)
136  //
137  // Causes:
138  // - Transaction cannot succeed because of ledger state.
139  // - Unexpected ledger state.
140  // - C++ exception.
141  //
142  // Implications:
143  // - Not applied
144  // - Not forwarded
145  // - Could succeed in an imagined ledger.
146  tefFAILURE = -199,
154  tefNO_AUTH_REQUIRED, // Can't set auth if auth is not required.
165 };
166 
167 //------------------------------------------------------------------------------
168 
170 {
171  // Note: Range is stable.
172  // Exact numbers are used in ripple-binary-codec:
173  // https://github.com/ripple/ripple-binary-codec/blob/master/src/enums/definitions.json
174  // Use tokens.
175 
176  // -99 .. -1: R Retry
177  // sequence too high, no funds for txn fee, originating -account
178  // non-existent
179  //
180  // Cause:
181  // Prior application of another, possibly non-existent, transaction could
182  // allow this transaction to succeed.
183  //
184  // Implications:
185  // - Not applied
186  // - May be forwarded
187  // - Results indicating the txn was forwarded: terQUEUED
188  // - All others are not forwarded.
189  // - Might succeed later
190  // - Hold
191  // - Makes hole in sequence which jams transactions.
192  terRETRY = -99,
193  terFUNDS_SPENT, // This is a free transaction, so don't burden network.
194  terINSUF_FEE_B, // Can't pay fee, therefore don't burden network.
195  terNO_ACCOUNT, // Can't pay fee, therefore don't burden network.
196  terNO_AUTH, // Not authorized to hold IOUs.
197  terNO_LINE, // Internal flag.
198  terOWNERS, // Can't succeed with non-zero owner count.
199  terPRE_SEQ, // Can't pay fee, no point in forwarding, so don't
200  // burden network.
201  terLAST, // Process after all other transactions
202  terNO_RIPPLE, // Rippling not allowed
203  terQUEUED // Transaction is being held in TxQ until fee drops
204 };
205 
206 //------------------------------------------------------------------------------
207 
209 {
210  // Note: Exact number must stay stable. This code is stored by value
211  // in metadata for historic transactions.
212 
213  // 0: S Success (success)
214  // Causes:
215  // - Success.
216  // Implications:
217  // - Applied
218  // - Forwarded
220 };
221 
222 //------------------------------------------------------------------------------
223 
225 {
226  // Note: Exact numbers must stay stable. These codes are stored by
227  // value in metadata for historic transactions.
228 
229  // 100 .. 159 C
230  // Claim fee only (ripple transaction with no good paths, pay to
231  // non-existent account, no path)
232  //
233  // Causes:
234  // - Success, but does not achieve optimal result.
235  // - Invalid transaction or no effect, but claim fee to use the sequence
236  // number.
237  //
238  // Implications:
239  // - Applied
240  // - Forwarded
241  //
242  // Only allowed as a return code of appliedTransaction when !tapRETRY.
243  // Otherwise, treated as terRETRY.
244  //
245  // DO NOT CHANGE THESE NUMBERS: They appear in ledger meta data.
246  tecCLAIM = 100,
252  tecDIR_FULL = 121,
255  tecNO_DST = 124,
259  tecPATH_DRY = 128,
260  tecUNFUNDED = 129, // Deprecated, old ambiguous unfunded.
263  tecOWNERS = 132,
265  tecNO_AUTH = 134,
266  tecNO_LINE = 135,
268  tecFROZEN = 137,
271  tecNO_ENTRY = 140,
275  tecINTERNAL = 144,
276  tecOVERSIZE = 145,
279  tecEXPIRED = 148,
281  tecKILLED = 150,
283  tecTOO_SOON = 152,
284 };
285 
286 //------------------------------------------------------------------------------
287 
288 // For generic purposes, a free function that returns the value of a TE*codes.
290 { return safe_cast<TERUnderlyingType>(v); }
291 
293 { return safe_cast<TERUnderlyingType>(v); }
294 
296 { return safe_cast<TERUnderlyingType>(v); }
297 
299 { return safe_cast<TERUnderlyingType>(v); }
300 
302 { return safe_cast<TERUnderlyingType>(v); }
303 
305 { return safe_cast<TERUnderlyingType>(v); }
306 
307 //------------------------------------------------------------------------------
308 // Template class that is specific to selected ranges of error codes. The
309 // Trait tells std::enable_if which ranges are allowed.
310 template <template<typename> class Trait>
312 {
314 
315 public:
316  // Constructors
317  constexpr TERSubset() : code_ (tesSUCCESS) { }
318  constexpr TERSubset (TERSubset const& rhs) = default;
319  constexpr TERSubset (TERSubset&& rhs) = default;
320 private:
321  constexpr explicit TERSubset (int rhs) : code_ (rhs) { }
322 public:
323  static constexpr TERSubset fromInt (int from)
324  {
325  return TERSubset (from);
326  }
327 
328  // Trait tells enable_if which types are allowed for construction.
329  template <typename T, typename = std::enable_if_t<Trait<T>::value>>
330  constexpr TERSubset (T rhs)
331  : code_ (TERtoInt (rhs))
332  { }
333 
334  // Assignment
335  constexpr TERSubset& operator=(TERSubset const& rhs) = default;
336  constexpr TERSubset& operator=(TERSubset&& rhs) = default;
337 
338  // Trait tells enable_if which types are allowed for assignment.
339  template <typename T>
340  constexpr auto
342  {
343  code_ = TERtoInt (rhs);
344  return *this;
345  }
346 
347  // Conversion to bool.
348  explicit operator bool() const
349  {
350  return code_ != tesSUCCESS;
351  }
352 
353  // Conversion to Json::Value allows assignment to Json::Objects
354  // without casting.
355  operator Json::Value() const
356  {
357  return Json::Value {code_};
358  }
359 
360  // Streaming operator.
362  {
363  return os << rhs.code_;
364  }
365 
366  // Return the underlying value. Not a member so similarly named free
367  // functions can do the same work for the enums.
368  //
369  // It's worth noting that an explicit conversion operator was considered
370  // and rejected. Consider this case, taken from Status.h
371  //
372  // class Status {
373  // int code_;
374  // public:
375  // Status (TER ter)
376  // : code_ (ter) {}
377  // }
378  //
379  // This code compiles with no errors or warnings if TER has an explicit
380  // (unnamed) conversion to int. To avoid silent conversions like these
381  // we provide (only) a named conversion.
382  friend constexpr TERUnderlyingType TERtoInt (TERSubset v)
383  {
384  return v.code_;
385  }
386 };
387 
388 // Comparison operators.
389 // Only enabled if both arguments return int if TERtiInt is called with them.
390 template <typename L, typename R>
391 constexpr auto
392 operator== (L const& lhs, R const& rhs) -> std::enable_if_t<
393  std::is_same<decltype (TERtoInt(lhs)), int>::value &&
394  std::is_same<decltype (TERtoInt(rhs)), int>::value, bool>
395 {
396  return TERtoInt(lhs) == TERtoInt(rhs);
397 }
398 
399 template <typename L, typename R>
400 constexpr auto
401 operator!= (L const& lhs, R const& rhs) -> std::enable_if_t<
402  std::is_same<decltype (TERtoInt(lhs)), int>::value &&
403  std::is_same<decltype (TERtoInt(rhs)), int>::value, bool>
404 {
405  return TERtoInt(lhs) != TERtoInt(rhs);
406 }
407 
408 template <typename L, typename R>
409 constexpr auto
410 operator< (L const& lhs, R const& rhs) -> std::enable_if_t<
411  std::is_same<decltype (TERtoInt(lhs)), int>::value &&
412  std::is_same<decltype (TERtoInt(rhs)), int>::value, bool>
413 {
414  return TERtoInt(lhs) < TERtoInt(rhs);
415 }
416 
417 template <typename L, typename R>
418 constexpr auto
419 operator<= (L const& lhs, R const& rhs) -> std::enable_if_t<
420  std::is_same<decltype (TERtoInt(lhs)), int>::value &&
421  std::is_same<decltype (TERtoInt(rhs)), int>::value, bool>
422 {
423  return TERtoInt(lhs) <= TERtoInt(rhs);
424 }
425 
426 template <typename L, typename R>
427 constexpr auto
428 operator> (L const& lhs, R const& rhs) -> std::enable_if_t<
429  std::is_same<decltype (TERtoInt(lhs)), int>::value &&
430  std::is_same<decltype (TERtoInt(rhs)), int>::value, bool>
431 {
432  return TERtoInt(lhs) > TERtoInt(rhs);
433 }
434 
435 template <typename L, typename R>
436 constexpr auto
437 operator>= (L const& lhs, R const& rhs) -> std::enable_if_t<
438  std::is_same<decltype (TERtoInt(lhs)), int>::value &&
439  std::is_same<decltype (TERtoInt(rhs)), int>::value, bool>
440 {
441  return TERtoInt(lhs) >= TERtoInt(rhs);
442 }
443 
444 //------------------------------------------------------------------------------
445 
446 // Use traits to build a TERSubset that can convert from any of the TE*codes
447 // enums *except* TECcodes: NotTEC
448 
449 // NOTE: NotTEC is useful for codes returned by preflight in transactors.
450 // Preflight checks occur prior to signature checking. If preflight returned
451 // a tec code, then a malicious user could submit a transaction with a very
452 // large fee and have that fee charged against an account without using that
453 // account's valid signature.
454 template <typename FROM> class CanCvtToNotTEC : public std::false_type {};
455 template <> class CanCvtToNotTEC<TELcodes> : public std::true_type {};
456 template <> class CanCvtToNotTEC<TEMcodes> : public std::true_type {};
457 template <> class CanCvtToNotTEC<TEFcodes> : public std::true_type {};
458 template <> class CanCvtToNotTEC<TERcodes> : public std::true_type {};
459 template <> class CanCvtToNotTEC<TEScodes> : public std::true_type {};
460 
462 
463 //------------------------------------------------------------------------------
464 
465 // Use traits to build a TERSubset that can convert from any of the TE*codes
466 // enums as well as from NotTEC.
467 template <typename FROM> class CanCvtToTER : public std::false_type {};
468 template <> class CanCvtToTER<TELcodes> : public std::true_type {};
469 template <> class CanCvtToTER<TEMcodes> : public std::true_type {};
470 template <> class CanCvtToTER<TEFcodes> : public std::true_type {};
471 template <> class CanCvtToTER<TERcodes> : public std::true_type {};
472 template <> class CanCvtToTER<TEScodes> : public std::true_type {};
473 template <> class CanCvtToTER<TECcodes> : public std::true_type {};
474 template <> class CanCvtToTER<NotTEC> : public std::true_type {};
475 
476 // TER allows all of the subsets.
478 
479 //------------------------------------------------------------------------------
480 
481 inline bool isTelLocal(TER x)
482 {
483  return ((x) >= telLOCAL_ERROR && (x) < temMALFORMED);
484 }
485 
486 inline bool isTemMalformed(TER x)
487 {
488  return ((x) >= temMALFORMED && (x) < tefFAILURE);
489 }
490 
491 inline bool isTefFailure(TER x)
492 {
493  return ((x) >= tefFAILURE && (x) < terRETRY);
494 }
495 
496 inline bool isTerRetry(TER x)
497 {
498  return ((x) >= terRETRY && (x) < tesSUCCESS);
499 }
500 
501 inline bool isTesSuccess(TER x)
502 {
503  return ((x) == tesSUCCESS);
504 }
505 
506 inline bool isTecClaim(TER x)
507 {
508  return ((x) >= tecCLAIM);
509 }
510 
511 bool
512 transResultInfo (TER code, std::string& token, std::string& text);
513 
515 transToken (TER code);
516 
518 transHuman (TER code);
519 
520 boost::optional<TER>
521 transCode(std::string const& token);
522 
523 } // ripple
524 
525 #endif
ripple::tecUNFUNDED_OFFER
@ tecUNFUNDED_OFFER
Definition: TER.h:249
std::is_same
ripple::tecFROZEN
@ tecFROZEN
Definition: TER.h:268
ripple::operator>
bool operator>(base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
Definition: base_uint.h:470
std::false_type
ripple::tecNO_TARGET
@ tecNO_TARGET
Definition: TER.h:269
ripple::temBAD_SEND_XRP_MAX
@ temBAD_SEND_XRP_MAX
Definition: TER.h:98
ripple::tefINTERNAL
@ tefINTERNAL
Definition: TER.h:153
ripple::tecINVARIANT_FAILED
@ tecINVARIANT_FAILED
Definition: TER.h:278
ripple::tecINSUF_RESERVE_LINE
@ tecINSUF_RESERVE_LINE
Definition: TER.h:253
std::string
STL class.
ripple::temBAD_OFFER
@ temBAD_OFFER
Definition: TER.h:93
ripple::TERSubset::code_
TERUnderlyingType code_
Definition: TER.h:313
ripple::tefBAD_ADD_AUTH
@ tefBAD_ADD_AUTH
Definition: TER.h:148
ripple::terINSUF_FEE_B
@ terINSUF_FEE_B
Definition: TER.h:194
ripple::temBAD_CURRENCY
@ temBAD_CURRENCY
Definition: TER.h:88
ripple::TEScodes
TEScodes
Definition: TER.h:208
ripple::TERSubset::operator<<
friend std::ostream & operator<<(std::ostream &os, TERSubset const &rhs)
Definition: TER.h:361
ripple::terNO_LINE
@ terNO_LINE
Definition: TER.h:197
ripple::tecOWNERS
@ tecOWNERS
Definition: TER.h:263
ripple::isTesSuccess
bool isTesSuccess(TER x)
Definition: TER.h:501
ripple::telLOCAL_ERROR
@ telLOCAL_ERROR
Definition: TER.h:53
ripple::tefINVARIANT_FAILED
@ tefINVARIANT_FAILED
Definition: TER.h:163
ripple::operator>=
bool operator>=(base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
Definition: base_uint.h:477
ripple::tecNO_REGULAR_KEY
@ tecNO_REGULAR_KEY
Definition: TER.h:262
ripple::telCAN_NOT_QUEUE_FEE
@ telCAN_NOT_QUEUE_FEE
Definition: TER.h:64
ripple::TECcodes
TECcodes
Definition: TER.h:224
ripple::temBAD_REGKEY
@ temBAD_REGKEY
Definition: TER.h:96
ripple::telBAD_DOMAIN
@ telBAD_DOMAIN
Definition: TER.h:54
ripple::CanCvtToNotTEC
Definition: TER.h:454
ripple::tecDST_TAG_NEEDED
@ tecDST_TAG_NEEDED
Definition: TER.h:274
ripple::TERSubset::TERtoInt
constexpr friend TERUnderlyingType TERtoInt(TERSubset v)
Definition: TER.h:382
ripple::terFUNDS_SPENT
@ terFUNDS_SPENT
Definition: TER.h:193
ripple::temCANNOT_PREAUTH_SELF
@ temCANNOT_PREAUTH_SELF
Definition: TER.h:118
ripple::transToken
std::string transToken(TER code)
Definition: TER.cpp:183
ripple::telCAN_NOT_QUEUE_FULL
@ telCAN_NOT_QUEUE_FULL
Definition: TER.h:65
ripple::telCAN_NOT_QUEUE
@ telCAN_NOT_QUEUE
Definition: TER.h:60
ripple::TERUnderlyingType
int TERUnderlyingType
Definition: TER.h:37
ripple::CanCvtToTER
Definition: TER.h:467
ripple::TERtoInt
constexpr TERUnderlyingType TERtoInt(TELcodes v)
Definition: TER.h:289
ripple::terNO_RIPPLE
@ terNO_RIPPLE
Definition: TER.h:202
ripple::temBAD_ISSUER
@ temBAD_ISSUER
Definition: TER.h:91
ripple::tefCREATED
@ tefCREATED
Definition: TER.h:151
ripple::temBAD_TRANSFER_RATE
@ temBAD_TRANSFER_RATE
Definition: TER.h:105
ripple::temBAD_PATH
@ temBAD_PATH
Definition: TER.h:94
ripple::temDST_IS_SRC
@ temDST_IS_SRC
Definition: TER.h:106
ripple::isTecClaim
bool isTecClaim(TER x)
Definition: TER.h:506
ripple::tefBAD_AUTH
@ tefBAD_AUTH
Definition: TER.h:149
ripple::operator==
bool operator==(Manifest const &lhs, Manifest const &rhs)
Definition: Manifest.h:148
ripple::tecKILLED
@ tecKILLED
Definition: TER.h:281
ripple::temUNCERTAIN
@ temUNCERTAIN
Definition: TER.h:121
ripple::terQUEUED
@ terQUEUED
Definition: TER.h:203
ripple::isTerRetry
bool isTerRetry(TER x)
Definition: TER.h:496
ripple::TERSubset::TERSubset
constexpr TERSubset(T rhs)
Definition: TER.h:330
ripple::tefBAD_QUORUM
@ tefBAD_QUORUM
Definition: TER.h:160
ripple::tecOVERSIZE
@ tecOVERSIZE
Definition: TER.h:276
ripple::tecNO_DST_INSUF_XRP
@ tecNO_DST_INSUF_XRP
Definition: TER.h:256
ripple::temINVALID_FLAG
@ temINVALID_FLAG
Definition: TER.h:109
ripple::tefBAD_LEDGER
@ tefBAD_LEDGER
Definition: TER.h:150
ripple::temBAD_QUORUM
@ temBAD_QUORUM
Definition: TER.h:114
ripple::operator<=
bool operator<=(base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
Definition: base_uint.h:463
ripple::telFAILED_PROCESSING
@ telFAILED_PROCESSING
Definition: TER.h:57
ripple::tecNO_ALTERNATIVE_KEY
@ tecNO_ALTERNATIVE_KEY
Definition: TER.h:261
ripple::temBAD_SEND_XRP_PARTIAL
@ temBAD_SEND_XRP_PARTIAL
Definition: TER.h:100
ripple::tefMAX_LEDGER
@ tefMAX_LEDGER
Definition: TER.h:158
std::enable_if_t
ripple::tefMASTER_DISABLED
@ tefMASTER_DISABLED
Definition: TER.h:157
std::ostream
STL class.
ripple::temBAD_LIMIT
@ temBAD_LIMIT
Definition: TER.h:92
ripple::terRETRY
@ terRETRY
Definition: TER.h:192
ripple::temBAD_SIGNER
@ temBAD_SIGNER
Definition: TER.h:113
ripple::tecDUPLICATE
@ tecDUPLICATE
Definition: TER.h:280
ripple::temBAD_SEND_XRP_PATHS
@ temBAD_SEND_XRP_PATHS
Definition: TER.h:101
ripple::TERSubset
Definition: TER.h:311
ripple::terLAST
@ terLAST
Definition: TER.h:201
ripple::tecFAILED_PROCESSING
@ tecFAILED_PROCESSING
Definition: TER.h:251
ripple::isTefFailure
bool isTefFailure(TER x)
Definition: TER.h:491
ripple::operator!=
bool operator!=(Manifest const &lhs, Manifest const &rhs)
Definition: Manifest.h:161
ripple::temDST_NEEDED
@ temDST_NEEDED
Definition: TER.h:107
ripple::temBAD_SEQUENCE
@ temBAD_SEQUENCE
Definition: TER.h:102
ripple::terOWNERS
@ terOWNERS
Definition: TER.h:198
ripple::tecUNFUNDED
@ tecUNFUNDED
Definition: TER.h:260
ripple::TER
TERSubset< CanCvtToTER > TER
Definition: TER.h:477
ripple::temBAD_SRC_ACCOUNT
@ temBAD_SRC_ACCOUNT
Definition: TER.h:104
ripple::telINSUF_FEE_P
@ telINSUF_FEE_P
Definition: TER.h:58
ripple::TELcodes
TELcodes
Definition: TER.h:41
ripple::terNO_AUTH
@ terNO_AUTH
Definition: TER.h:196
ripple::tecNO_LINE_REDUNDANT
@ tecNO_LINE_REDUNDANT
Definition: TER.h:258
ripple::tecUNFUNDED_PAYMENT
@ tecUNFUNDED_PAYMENT
Definition: TER.h:250
ripple::tecINTERNAL
@ tecINTERNAL
Definition: TER.h:275
ripple::temBAD_AMOUNT
@ temBAD_AMOUNT
Definition: TER.h:87
ripple::tecINSUFF_FEE
@ tecINSUFF_FEE
Definition: TER.h:267
ripple::temBAD_SEND_XRP_NO_DIRECT
@ temBAD_SEND_XRP_NO_DIRECT
Definition: TER.h:99
ripple::telBAD_PATH_COUNT
@ telBAD_PATH_COUNT
Definition: TER.h:55
ripple::temBAD_SIGNATURE
@ temBAD_SIGNATURE
Definition: TER.h:103
ripple::temUNKNOWN
@ temUNKNOWN
Definition: TER.h:122
ripple::tecPATH_PARTIAL
@ tecPATH_PARTIAL
Definition: TER.h:247
ripple::temREDUNDANT
@ temREDUNDANT
Definition: TER.h:110
ripple::tefFAILURE
@ tefFAILURE
Definition: TER.h:146
ripple::temBAD_FEE
@ temBAD_FEE
Definition: TER.h:90
ripple::TEFcodes
TEFcodes
Definition: TER.h:127
ripple::telCAN_NOT_QUEUE_BLOCKS
@ telCAN_NOT_QUEUE_BLOCKS
Definition: TER.h:62
ripple::tecNEED_MASTER_KEY
@ tecNEED_MASTER_KEY
Definition: TER.h:273
ripple::TERSubset::TERSubset
constexpr TERSubset(int rhs)
Definition: TER.h:321
ripple::transHuman
std::string transHuman(TER code)
Definition: TER.cpp:191
ripple::tecUNFUNDED_ADD
@ tecUNFUNDED_ADD
Definition: TER.h:248
ripple::tecDIR_FULL
@ tecDIR_FULL
Definition: TER.h:252
ripple::terNO_ACCOUNT
@ terNO_ACCOUNT
Definition: TER.h:195
ripple::tecTOO_SOON
@ tecTOO_SOON
Definition: TER.h:283
ripple::tefNOT_MULTI_SIGNING
@ tefNOT_MULTI_SIGNING
Definition: TER.h:161
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::transResultInfo
bool transResultInfo(TER code, std::string &token, std::string &text)
Definition: TER.cpp:169
ripple::tefNO_AUTH_REQUIRED
@ tefNO_AUTH_REQUIRED
Definition: TER.h:154
ripple::temINVALID_ACCOUNT_ID
@ temINVALID_ACCOUNT_ID
Definition: TER.h:117
ripple::tecNO_LINE_INSUF_RESERVE
@ tecNO_LINE_INSUF_RESERVE
Definition: TER.h:257
ripple::tefPAST_SEQ
@ tefPAST_SEQ
Definition: TER.h:155
ripple::tecNO_LINE
@ tecNO_LINE
Definition: TER.h:266
ripple::tecEXPIRED
@ tecEXPIRED
Definition: TER.h:279
ripple::temDISABLED
@ temDISABLED
Definition: TER.h:112
ripple::transCode
boost::optional< TER > transCode(std::string const &token)
Definition: TER.cpp:200
ripple::tefALREADY
@ tefALREADY
Definition: TER.h:147
ripple::TERSubset::fromInt
static constexpr TERSubset fromInt(int from)
Definition: TER.h:323
ripple::tecNO_ISSUER
@ tecNO_ISSUER
Definition: TER.h:264
ripple::isTelLocal
bool isTelLocal(TER x)
Definition: TER.h:481
ripple::tefTOO_BIG
@ tefTOO_BIG
Definition: TER.h:164
ripple::tecHAS_OBLIGATIONS
@ tecHAS_OBLIGATIONS
Definition: TER.h:282
ripple::tecNO_PERMISSION
@ tecNO_PERMISSION
Definition: TER.h:270
ripple::tefWRONG_PRIOR
@ tefWRONG_PRIOR
Definition: TER.h:156
ripple::temRIPPLE_EMPTY
@ temRIPPLE_EMPTY
Definition: TER.h:111
ripple::tecPATH_DRY
@ tecPATH_DRY
Definition: TER.h:259
ripple::telBAD_PUBLIC_KEY
@ telBAD_PUBLIC_KEY
Definition: TER.h:56
ripple::tecINSUFFICIENT_RESERVE
@ tecINSUFFICIENT_RESERVE
Definition: TER.h:272
ripple::TERSubset::TERSubset
constexpr TERSubset()
Definition: TER.h:317
ripple::terPRE_SEQ
@ terPRE_SEQ
Definition: TER.h:199
ripple::TERcodes
TERcodes
Definition: TER.h:169
ripple::tefBAD_AUTH_MASTER
@ tefBAD_AUTH_MASTER
Definition: TER.h:162
ripple::tecNO_ENTRY
@ tecNO_ENTRY
Definition: TER.h:271
ripple::temBAD_PATH_LOOP
@ temBAD_PATH_LOOP
Definition: TER.h:95
ripple::temMALFORMED
@ temMALFORMED
Definition: TER.h:85
ripple::TEMcodes
TEMcodes
Definition: TER.h:70
ripple::tefEXCEPTION
@ tefEXCEPTION
Definition: TER.h:152
ripple::telNO_DST_PARTIAL
@ telNO_DST_PARTIAL
Definition: TER.h:59
ripple::temBAD_TICK_SIZE
@ temBAD_TICK_SIZE
Definition: TER.h:116
ripple::operator<
bool operator<(base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
Definition: base_uint.h:456
ripple::tecNO_AUTH
@ tecNO_AUTH
Definition: TER.h:265
ripple::tecCLAIM
@ tecCLAIM
Definition: TER.h:246
ripple::temBAD_EXPIRATION
@ temBAD_EXPIRATION
Definition: TER.h:89
ripple::temBAD_SEND_XRP_LIMIT
@ temBAD_SEND_XRP_LIMIT
Definition: TER.h:97
ostream
ripple::telCAN_NOT_QUEUE_BALANCE
@ telCAN_NOT_QUEUE_BALANCE
Definition: TER.h:61
ripple::tecINSUF_RESERVE_OFFER
@ tecINSUF_RESERVE_OFFER
Definition: TER.h:254
ripple::tesSUCCESS
@ tesSUCCESS
Definition: TER.h:219
ripple::isTemMalformed
bool isTemMalformed(TER x)
Definition: TER.h:486
ripple::temBAD_WEIGHT
@ temBAD_WEIGHT
Definition: TER.h:115
ripple::tecNO_DST
@ tecNO_DST
Definition: TER.h:255
ripple::temINVALID
@ temINVALID
Definition: TER.h:108
ripple::TERSubset::operator=
constexpr TERSubset & operator=(TERSubset const &rhs)=default
ripple::telCAN_NOT_QUEUE_BLOCKED
@ telCAN_NOT_QUEUE_BLOCKED
Definition: TER.h:63
Json::Value
Represents a JSON value.
Definition: json_value.h:141
ripple::tefBAD_SIGNATURE
@ tefBAD_SIGNATURE
Definition: TER.h:159
ripple::tecCRYPTOCONDITION_ERROR
@ tecCRYPTOCONDITION_ERROR
Definition: TER.h:277
string