MCPcopy Create free account
hub / github.com/ElementsProject/elements / TransactionErrorString

Function TransactionErrorString

src/util/error.cpp:11–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include <util/translation.h>
10
11bilingual_str TransactionErrorString(const TransactionError err)
12{
13 switch (err) {
14 case TransactionError::OK:
15 return Untranslated("No error");
16 case TransactionError::MISSING_INPUTS:
17 return Untranslated("Inputs missing or spent");
18 case TransactionError::ALREADY_IN_CHAIN:
19 return Untranslated("Transaction already in block chain");
20 case TransactionError::P2P_DISABLED:
21 return Untranslated("Peer-to-peer functionality missing or disabled");
22 case TransactionError::MEMPOOL_REJECTED:
23 return Untranslated("Transaction rejected by mempool");
24 case TransactionError::MEMPOOL_ERROR:
25 return Untranslated("Mempool internal error");
26 case TransactionError::INVALID_PSBT:
27 return Untranslated("PSBT is not well-formed");
28 case TransactionError::PSBT_MISMATCH:
29 return Untranslated("PSBTs not compatible (different transactions)");
30 case TransactionError::SIGHASH_MISMATCH:
31 return Untranslated("Specified sighash value does not match value stored in PSBT");
32 case TransactionError::MAX_FEE_EXCEEDED:
33 return Untranslated("Fee exceeds maximum configured by user (e.g. -maxtxfee, maxfeerate)");
34 case TransactionError::EXTERNAL_SIGNER_NOT_FOUND:
35 return Untranslated("External signer not found");
36 case TransactionError::EXTERNAL_SIGNER_FAILED:
37 return Untranslated("External signer failed to sign");
38 case TransactionError::BLINDING_REQUIRED:
39 return Untranslated("Transaction is not yet fully blinded");
40 case TransactionError::VALUE_IMBALANCE:
41 return Untranslated("Transaction values or blinders are not balanced");
42 case TransactionError::UTXOS_MISSING_BALANCE_CHECK:
43 return Untranslated("Missing UTXOs that are needed to check transaction balance");
44 case TransactionError::INVALID_VALUE_PROOF:
45 return Untranslated("Proof of blinded value is invalid");
46 case TransactionError::INVALID_ASSET_PROOF:
47 return Untranslated("Proof of blinded asset is invalid");
48 case TransactionError::MISSING_BLINDING_KEY:
49 return Untranslated("Wallet does not have necessary blinding key");
50 case TransactionError::MISSING_SIDECHANNEL_DATA:
51 return Untranslated("A rangeproof did not encode necessary blinding data");
52 // no default case, so the compiler can warn about missing cases
53 }
54 assert(false);
55}
56
57bilingual_str ResolveErrMsg(const std::string& optname, const std::string& strBind)
58{

Callers 6

spend.cppFile · 0.85
FUZZ_TARGETFunction · 0.85
openWithPSBTMethod · 0.85
signTransactionMethod · 0.85
broadcastTransactionMethod · 0.85
JSONRPCTransactionErrorFunction · 0.85

Calls 1

UntranslatedFunction · 0.85

Tested by 1

FUZZ_TARGETFunction · 0.68