forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: move error.h TransactionError enum to node/types.h
New node/types.h file is analagous to existing wallet/types.h and is a better place to define simple node types that are shared externally with wallet and gui code than the util library. Motivation for this change is to completely remove util/error.h file currently holding TransactionError in a followup commit.
- Loading branch information
Showing
4 changed files
with
41 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// 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, | ||
P2P_DISABLED, | ||
MEMPOOL_REJECTED, | ||
MEMPOOL_ERROR, | ||
INVALID_PSBT, | ||
PSBT_MISMATCH, | ||
SIGHASH_MISMATCH, | ||
MAX_FEE_EXCEEDED, | ||
MAX_BURN_EXCEEDED, | ||
EXTERNAL_SIGNER_NOT_FOUND, | ||
EXTERNAL_SIGNER_FAILED, | ||
INVALID_PACKAGE, | ||
}; | ||
|
||
#endif // BITCOIN_NODE_TYPES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters