Changeset View
Changeset View
Standalone View
Standalone View
src/script/signingprovider.h
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
FlatSigningProvider Merge(const FlatSigningProvider &a, | FlatSigningProvider Merge(const FlatSigningProvider &a, | ||||
const FlatSigningProvider &b); | const FlatSigningProvider &b); | ||||
/** | /** | ||||
* Fillable signing provider that keeps keys in an address->secret map | * Fillable signing provider that keeps keys in an address->secret map | ||||
*/ | */ | ||||
class FillableSigningProvider : public SigningProvider { | class FillableSigningProvider : public SigningProvider { | ||||
protected: | protected: | ||||
mutable RecursiveMutex cs_KeyStore; | |||||
using KeyMap = std::map<CKeyID, CKey>; | using KeyMap = std::map<CKeyID, CKey>; | ||||
using ScriptMap = std::map<CScriptID, CScript>; | using ScriptMap = std::map<CScriptID, CScript>; | ||||
KeyMap mapKeys GUARDED_BY(cs_KeyStore); | KeyMap mapKeys GUARDED_BY(cs_KeyStore); | ||||
ScriptMap mapScripts GUARDED_BY(cs_KeyStore); | ScriptMap mapScripts GUARDED_BY(cs_KeyStore); | ||||
public: | public: | ||||
mutable RecursiveMutex cs_KeyStore; | |||||
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey); | virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey); | ||||
virtual bool AddKey(const CKey &key) { | virtual bool AddKey(const CKey &key) { | ||||
return AddKeyPubKey(key, key.GetPubKey()); | return AddKeyPubKey(key, key.GetPubKey()); | ||||
} | } | ||||
virtual bool GetPubKey(const CKeyID &address, | virtual bool GetPubKey(const CKeyID &address, | ||||
CPubKey &vchPubKeyOut) const override; | CPubKey &vchPubKeyOut) const override; | ||||
virtual bool HaveKey(const CKeyID &address) const override; | virtual bool HaveKey(const CKeyID &address) const override; | ||||
virtual std::set<CKeyID> GetKeys() const; | virtual std::set<CKeyID> GetKeys() const; | ||||
Show All 15 Lines |