diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-09-07 13:24:20 -0700 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-10-04 20:32:04 -0700 |
commit | 3155fd23f2a6180e696269b47fd642caa7b78925 (patch) | |
tree | 5b2d98983fa963177209ed765096ca2ab35d892f /src/keystore.h | |
parent | 52f8877525d5238f3440e73710507be889d14127 (diff) |
CKeystore: move relevant implementation out of the header
Diffstat (limited to 'src/keystore.h')
-rw-r--r-- | src/keystore.h | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/src/keystore.h b/src/keystore.h index 9b85ddb0ec..26ddff436f 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -62,37 +62,9 @@ protected: public: bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override; bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const override; - bool HaveKey(const CKeyID &address) const override - { - bool result; - { - LOCK(cs_KeyStore); - result = (mapKeys.count(address) > 0); - } - return result; - } - std::set<CKeyID> GetKeys() const override - { - LOCK(cs_KeyStore); - std::set<CKeyID> set_address; - for (const auto& mi : mapKeys) { - set_address.insert(mi.first); - } - return set_address; - } - bool GetKey(const CKeyID &address, CKey &keyOut) const override - { - { - LOCK(cs_KeyStore); - KeyMap::const_iterator mi = mapKeys.find(address); - if (mi != mapKeys.end()) - { - keyOut = mi->second; - return true; - } - } - return false; - } + bool HaveKey(const CKeyID &address) const override; + std::set<CKeyID> GetKeys() const override; + bool GetKey(const CKeyID &address, CKey &keyOut) const override; bool AddCScript(const CScript& redeemScript) override; bool HaveCScript(const CScriptID &hash) const override; bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const override; |