MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / TransactionErrorString

Function TransactionErrorString

src/common/messages.cpp:127–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127bilingual_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
150bilingual_str ResolveErrMsg(const std::string& optname, const std::string& strBind)
151{

Callers 5

spend.cppFile · 0.85
sendallFunction · 0.85
FUZZ_TARGETFunction · 0.85
broadcastTransactionMethod · 0.85
JSONRPCTransactionErrorFunction · 0.85

Calls 1

UntranslatedFunction · 0.85

Tested by 1

FUZZ_TARGETFunction · 0.68