mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-01 03:01:05 +00: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.
28 lines
840 B
C
28 lines
840 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 node/types.h is a home for public enum and struct type definitions
|
|
//! that are used by internally by node code, but also used externally by wallet
|
|
//! or 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_NODE_TYPES_H
|
|
#define BITCOIN_NODE_TYPES_H
|
|
|
|
enum class TransactionError {
|
|
OK, //!< No error
|
|
MISSING_INPUTS,
|
|
ALREADY_IN_CHAIN,
|
|
MEMPOOL_REJECTED,
|
|
MEMPOOL_ERROR,
|
|
MAX_FEE_EXCEEDED,
|
|
MAX_BURN_EXCEEDED,
|
|
INVALID_PACKAGE,
|
|
};
|
|
|
|
#endif // BITCOIN_NODE_TYPES_H
|