Add HaveKey and HaveCScript to SigningProvider

This commit is contained in:
Andrew Chow 2019-06-06 09:53:01 +02:00
parent 1381ddbcfc
commit 1b699a5083
2 changed files with 2 additions and 2 deletions

View file

@ -23,12 +23,10 @@ public:
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) =0; virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) =0;
//! 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 std::set<CKeyID> GetKeys() const =0; virtual std::set<CKeyID> GetKeys() 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
virtual bool AddCScript(const CScript& redeemScript) =0; virtual bool AddCScript(const CScript& redeemScript) =0;
virtual bool HaveCScript(const CScriptID &hash) const =0;
virtual std::set<CScriptID> GetCScripts() const =0; virtual std::set<CScriptID> GetCScripts() const =0;
//! Support for Watch-only addresses //! Support for Watch-only addresses

View file

@ -51,8 +51,10 @@ class SigningProvider
public: public:
virtual ~SigningProvider() {} virtual ~SigningProvider() {}
virtual bool GetCScript(const CScriptID &scriptid, CScript& script) const { return false; } virtual bool GetCScript(const CScriptID &scriptid, CScript& script) const { return false; }
virtual bool HaveCScript(const CScriptID &scriptid) const { return false; }
virtual bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const { return false; } virtual bool GetPubKey(const CKeyID &address, CPubKey& pubkey) const { return false; }
virtual bool GetKey(const CKeyID &address, CKey& key) const { return false; } virtual bool GetKey(const CKeyID &address, CKey& key) const { return false; }
virtual bool HaveKey(const CKeyID &address) const { return false; }
virtual bool GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info) const { return false; } virtual bool GetKeyOrigin(const CKeyID& keyid, KeyOriginInfo& info) const { return false; }
}; };