aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/ismine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/ismine.h')
-rw-r--r--src/wallet/ismine.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/wallet/ismine.h b/src/wallet/ismine.h
index 38ed7e7770..4ef4ef98ac 100644
--- a/src/wallet/ismine.h
+++ b/src/wallet/ismine.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2019 The Bitcoin Core developers
+// Copyright (c) 2009-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.
@@ -8,12 +8,15 @@
#include <script/standard.h>
-#include <stdint.h>
#include <bitset>
+#include <cstdint>
+#include <type_traits>
-class CWallet;
class CScript;
+namespace wallet {
+class CWallet;
+
/**
* IsMine() return codes, which depend on ScriptPubKeyMan implementation.
* Not every ScriptPubKeyMan covers all types, please refer to
@@ -35,8 +38,7 @@ class CScript;
* ISMINE_USED: the scriptPubKey corresponds to a used address owned by the wallet user.
*
*/
-enum isminetype : unsigned int
-{
+enum isminetype : unsigned int {
ISMINE_NO = 0,
ISMINE_WATCH_ONLY = 1 << 0,
ISMINE_SPENDABLE = 1 << 1,
@@ -46,7 +48,7 @@ enum isminetype : unsigned int
ISMINE_ENUM_ELEMENTS,
};
/** used for bitflags of isminetype */
-typedef uint8_t isminefilter;
+using isminefilter = std::underlying_type<isminetype>::type;
/**
* Cachable amount subdivided into watchonly and spendable parts.
@@ -66,5 +68,6 @@ struct CachableAmount
m_value[filter] = value;
}
};
+} // namespace wallet
#endif // BITCOIN_WALLET_ISMINE_H