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