|
|
@ -30,7 +30,7 @@ public: |
|
|
|
//! Check whether a key corresponding to a given address is present in the store.
|
|
|
|
//! Check whether a key corresponding to a given address is present in the store.
|
|
|
|
virtual bool HaveKey(const CKeyID &address) const =0; |
|
|
|
virtual bool HaveKey(const CKeyID &address) const =0; |
|
|
|
virtual bool GetKey(const CKeyID &address, CKey& keyOut) const =0; |
|
|
|
virtual bool GetKey(const CKeyID &address, CKey& keyOut) const =0; |
|
|
|
virtual void GetKeys(std::set<CKeyID> &setAddress) const =0; |
|
|
|
virtual std::set<CKeyID> GetKeys() const =0; |
|
|
|
virtual bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const =0; |
|
|
|
virtual bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const =0; |
|
|
|
|
|
|
|
|
|
|
|
//! Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki
|
|
|
|
//! Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki
|
|
|
@ -71,18 +71,14 @@ public: |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
void GetKeys(std::set<CKeyID> &setAddress) const override |
|
|
|
std::set<CKeyID> GetKeys() const override |
|
|
|
{ |
|
|
|
{ |
|
|
|
setAddress.clear(); |
|
|
|
LOCK(cs_KeyStore); |
|
|
|
{ |
|
|
|
std::set<CKeyID> set_address; |
|
|
|
LOCK(cs_KeyStore); |
|
|
|
for (const auto& mi : mapKeys) { |
|
|
|
KeyMap::const_iterator mi = mapKeys.begin(); |
|
|
|
set_address.insert(mi.first); |
|
|
|
while (mi != mapKeys.end()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
setAddress.insert((*mi).first); |
|
|
|
|
|
|
|
mi++; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return set_address; |
|
|
|
} |
|
|
|
} |
|
|
|
bool GetKey(const CKeyID &address, CKey &keyOut) const override |
|
|
|
bool GetKey(const CKeyID &address, CKey &keyOut) const override |
|
|
|
{ |
|
|
|
{ |
|
|
|