1 // Copyright (c) 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 kernel/types.h is a home for simple enum and struct type definitions
6 //! that can be used internally by functions in the libbitcoin_kernel library,
7 //! but also used externally by node, wallet, and 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_KERNEL_TYPES_H
14 #define BITCOIN_KERNEL_TYPES_H
15 16 namespace kernel {
17 //! Information about chainstate that notifications are sent from.
18 struct ChainstateRole {
19 //! Whether this is a notification from a chainstate that's been fully
20 //! validated starting from the genesis block. False if it is from an
21 //! assumeutxo snapshot chainstate that has not been validated yet.
22 bool validated{true};
23 24 //! Whether this is a historical chainstate downloading old blocks to
25 //! validate an assumeutxo snapshot, not syncing to the network tip.
26 bool historical{false};
27 };
28 } // namespace kernel
29 30 #endif // BITCOIN_KERNEL_TYPES_H
31