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