mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 21:12:29 +02:00

Add separate PSBTError enum instead of reusing TransactionError enum for PSBT operations, and drop unused error codes. The error codes returned by PSBT operations and transaction broadcast functions mostly do not overlap, so using an unified enum makes it harder to call any of these functions and know which errors actually need to be handled. Define PSBTError in the common library because PSBT functionality is implemented in the common library and used by both the node (for rawtransaction RPCs) and the wallet.
27 lines
870 B
C++
27 lines
870 B
C++
// Copyright (c) 2010-2021 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
//! @file common/types.h is a home for simple enum and struct type definitions
|
|
//! that can be used internally by functions in the libbitcoin_common library,
|
|
//! but also used externally by node, wallet, and GUI code.
|
|
//!
|
|
//! This file is intended to define only simple types that do not have external
|
|
//! dependencies. More complicated types should be defined in dedicated header
|
|
//! files.
|
|
|
|
#ifndef BITCOIN_COMMON_TYPES_H
|
|
#define BITCOIN_COMMON_TYPES_H
|
|
|
|
namespace common {
|
|
enum class PSBTError {
|
|
MISSING_INPUTS,
|
|
SIGHASH_MISMATCH,
|
|
EXTERNAL_SIGNER_NOT_FOUND,
|
|
EXTERNAL_SIGNER_FAILED,
|
|
UNSUPPORTED,
|
|
};
|
|
} // namespace common
|
|
|
|
#endif // BITCOIN_COMMON_TYPES_H
|