77
88#include < util/system.h>
99
10- void CBasicKeyStore ::ImplicitlyLearnRelatedKeyScripts (const CPubKey& pubkey)
10+ void FillableSigningProvider ::ImplicitlyLearnRelatedKeyScripts (const CPubKey& pubkey)
1111{
1212 AssertLockHeld (cs_KeyStore);
1313 CKeyID key_id = pubkey.GetID ();
@@ -32,7 +32,7 @@ void CBasicKeyStore::ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey)
3232 }
3333}
3434
35- bool CBasicKeyStore ::GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const
35+ bool FillableSigningProvider ::GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const
3636{
3737 CKey key;
3838 if (!GetKey (address, key)) {
@@ -48,21 +48,21 @@ bool CBasicKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) con
4848 return true ;
4949}
5050
51- bool CBasicKeyStore ::AddKeyPubKey (const CKey& key, const CPubKey &pubkey)
51+ bool FillableSigningProvider ::AddKeyPubKey (const CKey& key, const CPubKey &pubkey)
5252{
5353 LOCK (cs_KeyStore);
5454 mapKeys[pubkey.GetID ()] = key;
5555 ImplicitlyLearnRelatedKeyScripts (pubkey);
5656 return true ;
5757}
5858
59- bool CBasicKeyStore ::HaveKey (const CKeyID &address) const
59+ bool FillableSigningProvider ::HaveKey (const CKeyID &address) const
6060{
6161 LOCK (cs_KeyStore);
6262 return mapKeys.count (address) > 0 ;
6363}
6464
65- std::set<CKeyID> CBasicKeyStore ::GetKeys () const
65+ std::set<CKeyID> FillableSigningProvider ::GetKeys () const
6666{
6767 LOCK (cs_KeyStore);
6868 std::set<CKeyID> set_address;
@@ -72,7 +72,7 @@ std::set<CKeyID> CBasicKeyStore::GetKeys() const
7272 return set_address;
7373}
7474
75- bool CBasicKeyStore ::GetKey (const CKeyID &address, CKey &keyOut) const
75+ bool FillableSigningProvider ::GetKey (const CKeyID &address, CKey &keyOut) const
7676{
7777 LOCK (cs_KeyStore);
7878 KeyMap::const_iterator mi = mapKeys.find (address);
@@ -83,23 +83,23 @@ bool CBasicKeyStore::GetKey(const CKeyID &address, CKey &keyOut) const
8383 return false ;
8484}
8585
86- bool CBasicKeyStore ::AddCScript (const CScript& redeemScript)
86+ bool FillableSigningProvider ::AddCScript (const CScript& redeemScript)
8787{
8888 if (redeemScript.size () > MAX_SCRIPT_ELEMENT_SIZE)
89- return error (" CBasicKeyStore ::AddCScript(): redeemScripts > %i bytes are invalid" , MAX_SCRIPT_ELEMENT_SIZE);
89+ return error (" FillableSigningProvider ::AddCScript(): redeemScripts > %i bytes are invalid" , MAX_SCRIPT_ELEMENT_SIZE);
9090
9191 LOCK (cs_KeyStore);
9292 mapScripts[CScriptID (redeemScript)] = redeemScript;
9393 return true ;
9494}
9595
96- bool CBasicKeyStore ::HaveCScript (const CScriptID& hash) const
96+ bool FillableSigningProvider ::HaveCScript (const CScriptID& hash) const
9797{
9898 LOCK (cs_KeyStore);
9999 return mapScripts.count (hash) > 0 ;
100100}
101101
102- std::set<CScriptID> CBasicKeyStore ::GetCScripts () const
102+ std::set<CScriptID> FillableSigningProvider ::GetCScripts () const
103103{
104104 LOCK (cs_KeyStore);
105105 std::set<CScriptID> set_script;
@@ -109,7 +109,7 @@ std::set<CScriptID> CBasicKeyStore::GetCScripts() const
109109 return set_script;
110110}
111111
112- bool CBasicKeyStore ::GetCScript (const CScriptID &hash, CScript& redeemScriptOut) const
112+ bool FillableSigningProvider ::GetCScript (const CScriptID &hash, CScript& redeemScriptOut) const
113113{
114114 LOCK (cs_KeyStore);
115115 ScriptMap::const_iterator mi = mapScripts.find (hash);
@@ -137,7 +137,7 @@ static bool ExtractPubKey(const CScript &dest, CPubKey& pubKeyOut)
137137 return true ;
138138}
139139
140- bool CBasicKeyStore ::AddWatchOnly (const CScript &dest)
140+ bool FillableSigningProvider ::AddWatchOnly (const CScript &dest)
141141{
142142 LOCK (cs_KeyStore);
143143 setWatchOnly.insert (dest);
@@ -149,7 +149,7 @@ bool CBasicKeyStore::AddWatchOnly(const CScript &dest)
149149 return true ;
150150}
151151
152- bool CBasicKeyStore ::RemoveWatchOnly (const CScript &dest)
152+ bool FillableSigningProvider ::RemoveWatchOnly (const CScript &dest)
153153{
154154 LOCK (cs_KeyStore);
155155 setWatchOnly.erase (dest);
@@ -162,19 +162,19 @@ bool CBasicKeyStore::RemoveWatchOnly(const CScript &dest)
162162 return true ;
163163}
164164
165- bool CBasicKeyStore ::HaveWatchOnly (const CScript &dest) const
165+ bool FillableSigningProvider ::HaveWatchOnly (const CScript &dest) const
166166{
167167 LOCK (cs_KeyStore);
168168 return setWatchOnly.count (dest) > 0 ;
169169}
170170
171- bool CBasicKeyStore ::HaveWatchOnly () const
171+ bool FillableSigningProvider ::HaveWatchOnly () const
172172{
173173 LOCK (cs_KeyStore);
174174 return (!setWatchOnly.empty ());
175175}
176176
177- CKeyID GetKeyForDestination (const CBasicKeyStore & store, const CTxDestination& dest)
177+ CKeyID GetKeyForDestination (const FillableSigningProvider & store, const CTxDestination& dest)
178178{
179179 // Only supports destinations which map to single public keys, i.e. P2PKH,
180180 // P2WPKH, and P2SH-P2WPKH.
0 commit comments