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