File tree Expand file tree Collapse file tree 4 files changed +41
-22
lines changed
Expand file tree Collapse file tree 4 files changed +41
-22
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ BITCOIN_CORE_H = \
234234 node/timeoffsets.h \
235235 node/transaction.h \
236236 node/txreconciliation.h \
237+ node/types.h \
237238 node/utxo_snapshot.h \
238239 node/validation_cache_args.h \
239240 noui.h \
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2010-2021 The Bitcoin Core developers
2+ // Distributed under the MIT software license, see the accompanying
3+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4+
5+ //! @file node/types.h is a home for public enum and struct type definitions
6+ //! that are used by internally by node code, but also used externally by wallet
7+ //! or GUI code.
8+ //!
9+ //! This file is intended to define only simple types that do not have external
10+ //! dependencies. More complicated types should be defined in dedicated header
11+ //! files.
12+
13+ #ifndef BITCOIN_NODE_TYPES_H
14+ #define BITCOIN_NODE_TYPES_H
15+
16+ enum class TransactionError {
17+ OK , //!< No error
18+ MISSING_INPUTS ,
19+ ALREADY_IN_CHAIN ,
20+ P2P_DISABLED ,
21+ MEMPOOL_REJECTED ,
22+ MEMPOOL_ERROR ,
23+ INVALID_PSBT ,
24+ PSBT_MISMATCH ,
25+ SIGHASH_MISMATCH ,
26+ MAX_FEE_EXCEEDED ,
27+ MAX_BURN_EXCEEDED ,
28+ EXTERNAL_SIGNER_NOT_FOUND ,
29+ EXTERNAL_SIGNER_FAILED ,
30+ INVALID_PACKAGE ,
31+ };
32+
33+ #endif // BITCOIN_NODE_TYPES_H
Original file line number Diff line number Diff line change 1515 * translating errors passed across wallet/node/rpc/gui code boundaries.
1616 */
1717
18+ #include < node/types.h>
1819#include < string>
1920
2021struct bilingual_str ;
2122
22- enum class TransactionError {
23- OK, // !< No error
24- MISSING_INPUTS,
25- ALREADY_IN_CHAIN,
26- P2P_DISABLED,
27- MEMPOOL_REJECTED,
28- MEMPOOL_ERROR,
29- INVALID_PSBT,
30- PSBT_MISMATCH,
31- SIGHASH_MISMATCH,
32- MAX_FEE_EXCEEDED,
33- MAX_BURN_EXCEEDED,
34- EXTERNAL_SIGNER_NOT_FOUND,
35- EXTERNAL_SIGNER_FAILED,
36- INVALID_PACKAGE,
37- };
38-
3923bilingual_str TransactionErrorString (const TransactionError error);
4024
4125bilingual_str ResolveErrMsg (const std::string& optname, const std::string& strBind);
Original file line number Diff line number Diff line change 33// Distributed under the MIT software license, see the accompanying
44// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
6- // ! @file Public type definitions that are used inside and outside of the wallet
7- // ! (e.g. by src/wallet and src/interfaces and src/qt code).
6+ // ! @file wallet/types.h is a home for public enum and struct type definitions
7+ // ! that are used by internally by wallet code, but also used externally by node
8+ // ! or GUI code.
89// !
9- // ! File is home for simple enum and struct definitions that don't deserve
10- // ! separate header files . More complicated wallet public types like
11- // ! CCoinControl that are used externally can have separate headers .
10+ // ! This file is intended to define only simple types that do not have external
11+ // ! dependencies . More complicated public wallet types like CCoinControl should
12+ // ! be defined in dedicated header files .
1213
1314#ifndef BITCOIN_WALLET_TYPES_H
1415#define BITCOIN_WALLET_TYPES_H
You can’t perform that action at this time.
0 commit comments