diff options
| author | Matt Corallo <[email protected]> | 2015-06-10 01:04:08 -0700 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2015-07-20 16:01:37 -0700 |
| commit | f5813bdd3eb93a2a8d7ba01989eef5b299fcbca4 (patch) | |
| tree | 7830024c8e7ab4a638ee534b5bab1b190010c2ee /src/keystore.h | |
| parent | Add have-pubkey distinction to ISMINE flags (diff) | |
| download | discoin-f5813bdd3eb93a2a8d7ba01989eef5b299fcbca4.tar.xz discoin-f5813bdd3eb93a2a8d7ba01989eef5b299fcbca4.zip | |
Add logic to track pubkeys as watch-only, not just scripts
Diffstat (limited to 'src/keystore.h')
| -rw-r--r-- | src/keystore.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/keystore.h b/src/keystore.h index 4a4b6d20a..b917bf20b 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -32,7 +32,7 @@ public: virtual bool HaveKey(const CKeyID &address) const =0; virtual bool GetKey(const CKeyID &address, CKey& keyOut) const =0; virtual void GetKeys(std::set<CKeyID> &setAddress) const =0; - virtual bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; + 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 virtual bool AddCScript(const CScript& redeemScript) =0; @@ -47,6 +47,7 @@ public: }; typedef std::map<CKeyID, CKey> KeyMap; +typedef std::map<CKeyID, CPubKey> WatchKeyMap; typedef std::map<CScriptID, CScript > ScriptMap; typedef std::set<CScript> WatchOnlySet; @@ -55,11 +56,13 @@ class CBasicKeyStore : public CKeyStore { protected: KeyMap mapKeys; + WatchKeyMap mapWatchKeys; ScriptMap mapScripts; WatchOnlySet setWatchOnly; public: bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey); + bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const; bool HaveKey(const CKeyID &address) const { bool result; |