|
3 | 3 | // Distributed under the MIT software license, see the accompanying |
4 | 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. |
5 | 5 |
|
6 | | -#ifndef BITCOIN_WALLET_ISMINE_H |
7 | | -#define BITCOIN_WALLET_ISMINE_H |
| 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). |
| 8 | +//! |
| 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. |
8 | 12 |
|
9 | | -#include <script/standard.h> |
| 13 | +#ifndef BITCOIN_WALLET_TYPES_H |
| 14 | +#define BITCOIN_WALLET_TYPES_H |
10 | 15 |
|
11 | | -#include <bitset> |
12 | | -#include <cstdint> |
13 | 16 | #include <type_traits> |
14 | 17 |
|
15 | | -class CScript; |
16 | | - |
17 | 18 | namespace wallet { |
18 | | -class CWallet; |
19 | | - |
20 | 19 | /** |
21 | 20 | * IsMine() return codes, which depend on ScriptPubKeyMan implementation. |
22 | 21 | * Not every ScriptPubKeyMan covers all types, please refer to |
@@ -49,25 +48,6 @@ enum isminetype : unsigned int { |
49 | 48 | }; |
50 | 49 | /** used for bitflags of isminetype */ |
51 | 50 | using isminefilter = std::underlying_type<isminetype>::type; |
52 | | - |
53 | | -/** |
54 | | - * Cachable amount subdivided into watchonly and spendable parts. |
55 | | - */ |
56 | | -struct CachableAmount |
57 | | -{ |
58 | | - // NO and ALL are never (supposed to be) cached |
59 | | - std::bitset<ISMINE_ENUM_ELEMENTS> m_cached; |
60 | | - CAmount m_value[ISMINE_ENUM_ELEMENTS]; |
61 | | - inline void Reset() |
62 | | - { |
63 | | - m_cached.reset(); |
64 | | - } |
65 | | - void Set(isminefilter filter, CAmount value) |
66 | | - { |
67 | | - m_cached.set(filter); |
68 | | - m_value[filter] = value; |
69 | | - } |
70 | | -}; |
71 | 51 | } // namespace wallet |
72 | 52 |
|
73 | | -#endif // BITCOIN_WALLET_ISMINE_H |
| 53 | +#endif // BITCOIN_WALLET_TYPES_H |
0 commit comments