Changeset View
Changeset View
Standalone View
Standalone View
src/keystore.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
typedef std::map<CScriptID, CScript> ScriptMap; | typedef std::map<CScriptID, CScript> ScriptMap; | ||||
typedef std::set<CScript> WatchOnlySet; | typedef std::set<CScript> WatchOnlySet; | ||||
/** Basic key store, that keeps keys in an address->secret map */ | /** Basic key store, that keeps keys in an address->secret map */ | ||||
class CBasicKeyStore : public CKeyStore { | class CBasicKeyStore : public CKeyStore { | ||||
protected: | protected: | ||||
mutable CCriticalSection cs_KeyStore; | mutable CCriticalSection cs_KeyStore; | ||||
KeyMap mapKeys; | KeyMap mapKeys GUARDED_BY(cs_KeyStore); | ||||
WatchKeyMap mapWatchKeys; | WatchKeyMap mapWatchKeys GUARDED_BY(cs_KeyStore); | ||||
ScriptMap mapScripts; | ScriptMap mapScripts GUARDED_BY(cs_KeyStore); | ||||
WatchOnlySet setWatchOnly; | WatchOnlySet setWatchOnly GUARDED_BY(cs_KeyStore); | ||||
void ImplicitlyLearnRelatedKeyScripts(const CPubKey &pubkey) | void ImplicitlyLearnRelatedKeyScripts(const CPubKey &pubkey) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore); | EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore); | ||||
public: | public: | ||||
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) override; | bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) override; | ||||
bool AddKey(const CKey &key) { return AddKeyPubKey(key, key.GetPubKey()); } | bool AddKey(const CKey &key) { return AddKeyPubKey(key, key.GetPubKey()); } | ||||
bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const override; | bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const override; | ||||
Show All 30 Lines |