Files
bitcoin/src/common/types.h
Ava Chow e58b680923 psbt: Return PSBTError from SignPSBTInput
SignPSBTInput will need to report the specific things that caused an
error to callers, so change it to return a PSBTError. Additionally some
callers will now check the return value and report an error to the user.

Currently, this should not change any behavior as the things that
SignPBSTInput will error on are all first checked by its callers.
2025-05-14 14:00:43 -07:00

29 lines
894 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,
INCOMPLETE,
OK,
};
} // namespace common
#endif // BITCOIN_COMMON_TYPES_H