| 125 | } |
| 126 | |
| 127 | bilingual_str TransactionErrorString(const TransactionError err) |
| 128 | { |
| 129 | switch (err) { |
| 130 | case TransactionError::OK: |
| 131 | return Untranslated("No error"); |
| 132 | case TransactionError::MISSING_INPUTS: |
| 133 | return Untranslated("Inputs missing or spent"); |
| 134 | case TransactionError::ALREADY_IN_UTXO_SET: |
| 135 | return Untranslated("Transaction outputs already in utxo set"); |
| 136 | case TransactionError::MEMPOOL_REJECTED: |
| 137 | return Untranslated("Transaction rejected by mempool"); |
| 138 | case TransactionError::MEMPOOL_ERROR: |
| 139 | return Untranslated("Mempool internal error"); |
| 140 | case TransactionError::MAX_FEE_EXCEEDED: |
| 141 | return Untranslated("Fee exceeds maximum configured by user (e.g. -maxtxfee, maxfeerate)"); |
| 142 | case TransactionError::MAX_BURN_EXCEEDED: |
| 143 | return Untranslated("Unspendable output exceeds maximum configured by user (maxburnamount)"); |
| 144 | case TransactionError::INVALID_PACKAGE: |
| 145 | return Untranslated("Transaction rejected due to invalid package"); |
| 146 | } // no default case, so the compiler can warn about missing cases |
| 147 | assert(false); |
| 148 | } |
| 149 | |
| 150 | bilingual_str ResolveErrMsg(const std::string& optname, const std::string& strBind) |
| 151 | { |