|
|
@ -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); |
|
|
|
LOCK(cs_KeyStore); |
|
|
|
KeyMap::const_iterator mi = mapKeys.begin(); |
|
|
|
std::set<CKeyID> set_address; |
|
|
|
while (mi != mapKeys.end()) |
|
|
|
for (const auto& mi : mapKeys) { |
|
|
|
{ |
|
|
|
set_address.insert(mi.first); |
|
|
|
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 |
|
|
|
{ |
|
|
|
{ |
|
|
|