aboutsummaryrefslogtreecommitdiff
path: root/src/keystore.h
diff options
context:
space:
mode:
author251 <13120787+251Labs@users.noreply.github.com>2018-07-10 20:55:53 +0200
committer251 <13120787+251Labs@users.noreply.github.com>2018-07-12 00:48:49 +0200
commitd0b9405f964670d6eaa8529f65fa7993b2a406c8 (patch)
tree31d5ddae7c3b91e3fc00ff33f9a30d6f8ed04123 /src/keystore.h
parent5ba77df15de92deb35bfd501d4635aed3236af30 (diff)
downloadbitcoin-d0b9405f964670d6eaa8529f65fa7993b2a406c8.tar.xz
Refactors `keystore.h` type aliases.
This squashed commit either encapsulates type alias declarations at the appropriate scope; or removes type aliases that are not used. The encapsulated type aliases are declared using C++11's `using` notation in favor of the `typedef` notation.
Diffstat (limited to 'src/keystore.h')
-rw-r--r--src/keystore.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/keystore.h b/src/keystore.h
index 8dd2772f28..f64024c7e7 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -38,17 +38,17 @@ public:
virtual bool HaveWatchOnly() const =0;
};
-typedef std::map<CKeyID, CKey> KeyMap;
-typedef std::map<CKeyID, CPubKey> WatchKeyMap;
-typedef std::map<CScriptID, CScript > ScriptMap;
-typedef std::set<CScript> WatchOnlySet;
-
/** Basic key store, that keeps keys in an address->secret map */
class CBasicKeyStore : public CKeyStore
{
protected:
mutable CCriticalSection cs_KeyStore;
+ using KeyMap = std::map<CKeyID, CKey>;
+ using WatchKeyMap = std::map<CKeyID, CPubKey>;
+ using ScriptMap = std::map<CScriptID, CScript>;
+ using WatchOnlySet = std::set<CScript>;
+
KeyMap mapKeys GUARDED_BY(cs_KeyStore);
WatchKeyMap mapWatchKeys GUARDED_BY(cs_KeyStore);
ScriptMap mapScripts GUARDED_BY(cs_KeyStore);
@@ -74,9 +74,6 @@ public:
bool HaveWatchOnly() const override;
};
-typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;
-typedef std::map<CKeyID, std::pair<CPubKey, std::vector<unsigned char> > > CryptedKeyMap;
-
/** Return the CKeyID of the key involved in a script (if there is a unique one). */
CKeyID GetKeyForDestination(const CKeyStore& store, const CTxDestination& dest);