Branch data Line data Source code
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 : : #include <cstddef>
17 : :
18 : : namespace node {
19 : : enum class TransactionError {
20 : : OK, //!< No error
21 : : MISSING_INPUTS,
22 : : ALREADY_IN_UTXO_SET,
23 : : MEMPOOL_REJECTED,
24 : : MEMPOOL_ERROR,
25 : : MAX_FEE_EXCEEDED,
26 : : MAX_BURN_EXCEEDED,
27 : : INVALID_PACKAGE,
28 : : };
29 : :
30 [ + - ]: 116116 : struct BlockCreateOptions {
31 : : /**
32 : : * Set false to omit mempool transactions
33 : : */
34 : : bool use_mempool{true};
35 : : /**
36 : : * The maximum additional weight which the pool will add to the coinbase
37 : : * scriptSig, witness and outputs. This must include any additional
38 : : * weight needed for larger CompactSize encoded lengths.
39 : : */
40 : : size_t coinbase_max_additional_weight{4000};
41 : : /**
42 : : * The maximum additional sigops which the pool will add in coinbase
43 : : * transaction outputs.
44 : : */
45 : : size_t coinbase_output_max_additional_sigops{400};
46 : : };
47 : : } // namespace node
48 : :
49 : : #endif // BITCOIN_NODE_TYPES_H
|