mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Conflicts were mostly obvious, except for those in CreateTransactionInternal. (This function was moved from wallet.cpp to spend.cpp, and substantially rewritten, between 0.21 and 22.0.) For those I manually applied the changes from the diff, which wound up taking a slightly different form. Also had to update the new test because the `addresses` field of the RPC output was removed.
52 lines
1.5 KiB
C++
52 lines
1.5 KiB
C++
// Copyright (c) 2010-2020 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_UTIL_ERROR_H
|
|
#define BITCOIN_UTIL_ERROR_H
|
|
|
|
/**
|
|
* util/error.h is a common place for definitions of simple error types and
|
|
* string functions. Types and functions defined here should not require any
|
|
* outside dependencies.
|
|
*
|
|
* Error types defined here can be used in different parts of the
|
|
* codebase, to avoid the need to write boilerplate code catching and
|
|
* translating errors passed across wallet/node/rpc/gui code boundaries.
|
|
*/
|
|
|
|
#include <string>
|
|
|
|
struct bilingual_str;
|
|
|
|
enum class TransactionError {
|
|
OK, //!< No error
|
|
MISSING_INPUTS,
|
|
ALREADY_IN_CHAIN,
|
|
P2P_DISABLED,
|
|
MEMPOOL_REJECTED,
|
|
MEMPOOL_ERROR,
|
|
INVALID_PSBT,
|
|
PSBT_MISMATCH,
|
|
SIGHASH_MISMATCH,
|
|
MAX_FEE_EXCEEDED,
|
|
EXTERNAL_SIGNER_NOT_FOUND,
|
|
EXTERNAL_SIGNER_FAILED,
|
|
BLINDING_REQUIRED,
|
|
VALUE_IMBALANCE,
|
|
UTXOS_MISSING_BALANCE_CHECK,
|
|
INVALID_VALUE_PROOF,
|
|
INVALID_ASSET_PROOF,
|
|
MISSING_BLINDING_KEY,
|
|
MISSING_SIDECHANNEL_DATA,
|
|
};
|
|
|
|
bilingual_str TransactionErrorString(const TransactionError error);
|
|
|
|
bilingual_str ResolveErrMsg(const std::string& optname, const std::string& strBind);
|
|
|
|
bilingual_str AmountHighWarn(const std::string& optname);
|
|
|
|
bilingual_str AmountErrMsg(const std::string& optname, const std::string& strValue);
|
|
|
|
#endif // BITCOIN_UTIL_ERROR_H
|