Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

utils-renumber.js 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. "use strict";
  2. /**
  3. * Quick script to re-number values
  4. */
  5. const input = {
  6. temBAD_SEND_XRP_PATHS: -283,
  7. temBAD_SEQUENCE: -282,
  8. temBAD_SIGNATURE: -281,
  9. temBAD_SRC_ACCOUNT: -280,
  10. temBAD_TRANSFER_RATE: -279,
  11. temDST_IS_SRC: -278,
  12. temDST_NEEDED: -277,
  13. temINVALID: -276,
  14. temINVALID_FLAG: -275,
  15. temREDUNDANT: -274,
  16. temRIPPLE_EMPTY: -273,
  17. temDISABLED: -272,
  18. temBAD_SIGNER: -271,
  19. temBAD_QUORUM: -270,
  20. temBAD_WEIGHT: -269,
  21. temBAD_TICK_SIZE: -268,
  22. temINVALID_ACCOUNT_ID: -267,
  23. temCANNOT_PREAUTH_SELF: -266,
  24. temUNCERTAIN: -265,
  25. temUNKNOWN: -264,
  26. tefFAILURE: -199,
  27. tefALREADY: -198,
  28. tefBAD_ADD_AUTH: -197,
  29. tefBAD_AUTH: -196,
  30. tefBAD_LEDGER: -195,
  31. tefCREATED: -194,
  32. tefEXCEPTION: -193,
  33. tefINTERNAL: -192,
  34. tefNO_AUTH_REQUIRED: -191,
  35. tefPAST_SEQ: -190,
  36. tefWRONG_PRIOR: -189,
  37. tefMASTER_DISABLED: -188,
  38. tefMAX_LEDGER: -187,
  39. tefBAD_SIGNATURE: -186,
  40. tefBAD_QUORUM: -185,
  41. tefNOT_MULTI_SIGNING: -184,
  42. tefBAD_AUTH_MASTER: -183,
  43. tefINVARIANT_FAILED: -182,
  44. tefTOO_BIG: -181,
  45. terRETRY: -99,
  46. terFUNDS_SPENT: -98,
  47. terINSUF_FEE_B: -97,
  48. terNO_ACCOUNT: -96,
  49. terNO_AUTH: -95,
  50. terNO_LINE: -94,
  51. terOWNERS: -93,
  52. terPRE_SEQ: -92,
  53. terLAST: -91,
  54. terNO_RIPPLE: -90,
  55. terQUEUED: -89,
  56. tesSUCCESS: 0,
  57. tecCLAIM: 100,
  58. tecPATH_PARTIAL: 101,
  59. tecUNFUNDED_ADD: 102,
  60. tecUNFUNDED_OFFER: 103,
  61. tecUNFUNDED_PAYMENT: 104,
  62. tecFAILED_PROCESSING: 105,
  63. tecDIR_FULL: 121,
  64. tecINSUF_RESERVE_LINE: 122,
  65. tecINSUF_RESERVE_OFFER: 123,
  66. tecNO_DST: 124,
  67. tecNO_DST_INSUF_XRP: 125,
  68. tecNO_LINE_INSUF_RESERVE: 126,
  69. tecNO_LINE_REDUNDANT: 127,
  70. tecPATH_DRY: 128,
  71. tecUNFUNDED: 129,
  72. tecNO_ALTERNATIVE_KEY: 130,
  73. tecNO_REGULAR_KEY: 131,
  74. tecOWNERS: 132,
  75. tecNO_ISSUER: 133,
  76. tecNO_AUTH: 134,
  77. tecNO_LINE: 135,
  78. tecINSUFF_FEE: 136,
  79. tecFROZEN: 137,
  80. tecNO_TARGET: 138,
  81. tecNO_PERMISSION: 139,
  82. tecNO_ENTRY: 140,
  83. tecINSUFFICIENT_RESERVE: 141,
  84. tecNEED_MASTER_KEY: 142,
  85. tecDST_TAG_NEEDED: 143,
  86. tecINTERNAL: 144,
  87. tecOVERSIZE: 145,
  88. tecCRYPTOCONDITION_ERROR: 146,
  89. tecINVARIANT_FAILED: 147,
  90. tecEXPIRED: 148,
  91. tecDUPLICATE: 149,
  92. tecKILLED: 150,
  93. tecHAS_OBLIGATIONS: 151,
  94. tecTOO_SOON: 152,
  95. };
  96. let startingFromTemBADSENDXRPPATHS = -284;
  97. let startingFromTefFAILURE = -199;
  98. let startingFromTerRETRY = -99;
  99. const tesSUCCESS = 0;
  100. let startingFromTecCLAIM = 100;
  101. const startingFromTecDIRFULL = 121;
  102. let previousKey = 'tem';
  103. Object.keys(input).forEach((key) => {
  104. if (key.substring(0, 3) !== previousKey.substring(0, 3)) {
  105. console.log();
  106. previousKey = key;
  107. }
  108. if (key.substring(0, 3) === 'tem') {
  109. console.log(` "${key}": ${startingFromTemBADSENDXRPPATHS++},`);
  110. }
  111. else if (key.substring(0, 3) === 'tef') {
  112. console.log(` "${key}": ${startingFromTefFAILURE++},`);
  113. }
  114. else if (key.substring(0, 3) === 'ter') {
  115. console.log(` "${key}": ${startingFromTerRETRY++},`);
  116. }
  117. else if (key.substring(0, 3) === 'tes') {
  118. console.log(` "${key}": ${tesSUCCESS},`);
  119. }
  120. else if (key.substring(0, 3) === 'tec') {
  121. if (key === 'tecDIR_FULL') {
  122. startingFromTecCLAIM = startingFromTecDIRFULL;
  123. }
  124. console.log(` "${key}": ${startingFromTecCLAIM++},`);
  125. }
  126. });
  127. //# sourceMappingURL=utils-renumber.js.map