diff --git a/doc/developer-notes.md b/doc/developer-notes.md index ecd720539..39463dc6f 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -375,7 +375,7 @@ reported in the debug.log file. Re-architecting the core code so there are better-defined interfaces between the various components is a goal, with any necessary locking -done by the components (e.g. see the self-contained `CBasicKeyStore` class +done by the components (e.g. see the self-contained `FillableSigningProvider` class and its `cs_KeyStore` lock for example). Threads diff --git a/src/bench/ccoins_caching.cpp b/src/bench/ccoins_caching.cpp index 1041a2230..57a8e164c 100644 --- a/src/bench/ccoins_caching.cpp +++ b/src/bench/ccoins_caching.cpp @@ -17,7 +17,7 @@ // paid to a TX_PUBKEYHASH. // static std::vector -SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsViewCache& coinsRet) +SetupDummyInputs(FillableSigningProvider& keystoreRet, CCoinsViewCache& coinsRet) { std::vector dummyTransactions; dummyTransactions.resize(2); @@ -55,7 +55,7 @@ SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsViewCache& coinsRet) // (https://github.com/bitcoin/bitcoin/issues/7883#issuecomment-224807484) static void CCoinsCaching(benchmark::State& state) { - CBasicKeyStore keystore; + FillableSigningProvider keystore; CCoinsView coinsDummy; CCoinsViewCache coins(&coinsDummy); std::vector dummyTransactions = SetupDummyInputs(keystore, coins); diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 75776727a..271f06469 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -557,7 +557,7 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr) if (!registers.count("privatekeys")) throw std::runtime_error("privatekeys register variable must be set."); - CBasicKeyStore tempKeystore; + FillableSigningProvider tempKeystore; UniValue keysObj = registers["privatekeys"]; for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) { @@ -631,7 +631,7 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr) } } - const CBasicKeyStore& keystore = tempKeystore; + const FillableSigningProvider& keystore = tempKeystore; bool fHashSingle = ((nHashType & ~SIGHASH_ANYONECANPAY) == SIGHASH_SINGLE); diff --git a/src/keystore.cpp b/src/keystore.cpp index 0319c469f..6f331ffa5 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -7,7 +7,7 @@ #include -void CBasicKeyStore::ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey) +void FillableSigningProvider::ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey) { AssertLockHeld(cs_KeyStore); CKeyID key_id = pubkey.GetID(); @@ -32,7 +32,7 @@ void CBasicKeyStore::ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey) } } -bool CBasicKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const +bool FillableSigningProvider::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const { CKey key; if (!GetKey(address, key)) { @@ -48,7 +48,7 @@ bool CBasicKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) con return true; } -bool CBasicKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey) +bool FillableSigningProvider::AddKeyPubKey(const CKey& key, const CPubKey &pubkey) { LOCK(cs_KeyStore); mapKeys[pubkey.GetID()] = key; @@ -56,13 +56,13 @@ bool CBasicKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey) return true; } -bool CBasicKeyStore::HaveKey(const CKeyID &address) const +bool FillableSigningProvider::HaveKey(const CKeyID &address) const { LOCK(cs_KeyStore); return mapKeys.count(address) > 0; } -std::set CBasicKeyStore::GetKeys() const +std::set FillableSigningProvider::GetKeys() const { LOCK(cs_KeyStore); std::set set_address; @@ -72,7 +72,7 @@ std::set CBasicKeyStore::GetKeys() const return set_address; } -bool CBasicKeyStore::GetKey(const CKeyID &address, CKey &keyOut) const +bool FillableSigningProvider::GetKey(const CKeyID &address, CKey &keyOut) const { LOCK(cs_KeyStore); KeyMap::const_iterator mi = mapKeys.find(address); @@ -83,23 +83,23 @@ bool CBasicKeyStore::GetKey(const CKeyID &address, CKey &keyOut) const return false; } -bool CBasicKeyStore::AddCScript(const CScript& redeemScript) +bool FillableSigningProvider::AddCScript(const CScript& redeemScript) { if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE) - return error("CBasicKeyStore::AddCScript(): redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE); + return error("FillableSigningProvider::AddCScript(): redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE); LOCK(cs_KeyStore); mapScripts[CScriptID(redeemScript)] = redeemScript; return true; } -bool CBasicKeyStore::HaveCScript(const CScriptID& hash) const +bool FillableSigningProvider::HaveCScript(const CScriptID& hash) const { LOCK(cs_KeyStore); return mapScripts.count(hash) > 0; } -std::set CBasicKeyStore::GetCScripts() const +std::set FillableSigningProvider::GetCScripts() const { LOCK(cs_KeyStore); std::set set_script; @@ -109,7 +109,7 @@ std::set CBasicKeyStore::GetCScripts() const return set_script; } -bool CBasicKeyStore::GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const +bool FillableSigningProvider::GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const { LOCK(cs_KeyStore); ScriptMap::const_iterator mi = mapScripts.find(hash); @@ -137,7 +137,7 @@ static bool ExtractPubKey(const CScript &dest, CPubKey& pubKeyOut) return true; } -bool CBasicKeyStore::AddWatchOnly(const CScript &dest) +bool FillableSigningProvider::AddWatchOnly(const CScript &dest) { LOCK(cs_KeyStore); setWatchOnly.insert(dest); @@ -149,7 +149,7 @@ bool CBasicKeyStore::AddWatchOnly(const CScript &dest) return true; } -bool CBasicKeyStore::RemoveWatchOnly(const CScript &dest) +bool FillableSigningProvider::RemoveWatchOnly(const CScript &dest) { LOCK(cs_KeyStore); setWatchOnly.erase(dest); @@ -162,19 +162,19 @@ bool CBasicKeyStore::RemoveWatchOnly(const CScript &dest) return true; } -bool CBasicKeyStore::HaveWatchOnly(const CScript &dest) const +bool FillableSigningProvider::HaveWatchOnly(const CScript &dest) const { LOCK(cs_KeyStore); return setWatchOnly.count(dest) > 0; } -bool CBasicKeyStore::HaveWatchOnly() const +bool FillableSigningProvider::HaveWatchOnly() const { LOCK(cs_KeyStore); return (!setWatchOnly.empty()); } -CKeyID GetKeyForDestination(const CBasicKeyStore& store, const CTxDestination& dest) +CKeyID GetKeyForDestination(const FillableSigningProvider& store, const CTxDestination& dest) { // Only supports destinations which map to single public keys, i.e. P2PKH, // P2WPKH, and P2SH-P2WPKH. diff --git a/src/keystore.h b/src/keystore.h index 3e46acda1..98209d4a4 100644 --- a/src/keystore.h +++ b/src/keystore.h @@ -16,7 +16,7 @@ #include /** Basic key store, that keeps keys in an address->secret map */ -class CBasicKeyStore : public SigningProvider +class FillableSigningProvider : public SigningProvider { protected: mutable CCriticalSection cs_KeyStore; @@ -52,6 +52,6 @@ public: }; /** Return the CKeyID of the key involved in a script (if there is a unique one). */ -CKeyID GetKeyForDestination(const CBasicKeyStore& store, const CTxDestination& dest); +CKeyID GetKeyForDestination(const FillableSigningProvider& store, const CTxDestination& dest); #endif // BITCOIN_KEYSTORE_H diff --git a/src/outputtype.cpp b/src/outputtype.cpp index 13ce1e29a..fce5a1783 100644 --- a/src/outputtype.cpp +++ b/src/outputtype.cpp @@ -73,7 +73,7 @@ std::vector GetAllDestinationsForKey(const CPubKey& key) } } -CTxDestination AddAndGetDestinationForScript(CBasicKeyStore& keystore, const CScript& script, OutputType type) +CTxDestination AddAndGetDestinationForScript(FillableSigningProvider& keystore, const CScript& script, OutputType type) { // Add script to keystore keystore.AddCScript(script); diff --git a/src/outputtype.h b/src/outputtype.h index d07e6ba08..dbaf0ee38 100644 --- a/src/outputtype.h +++ b/src/outputtype.h @@ -44,7 +44,7 @@ std::vector GetAllDestinationsForKey(const CPubKey& key); * This function will automatically add the script (and any other * necessary scripts) to the keystore. */ -CTxDestination AddAndGetDestinationForScript(CBasicKeyStore& keystore, const CScript& script, OutputType); +CTxDestination AddAndGetDestinationForScript(FillableSigningProvider& keystore, const CScript& script, OutputType); #endif // BITCOIN_OUTPUTTYPE_H diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 7a1bdec7b..103ae6283 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -122,7 +122,7 @@ static UniValue createmultisig(const JSONRPCRequest& request) } // Construct using pay-to-script-hash: - CBasicKeyStore keystore; + FillableSigningProvider keystore; CScript inner; const CTxDestination dest = AddAndGetMultisigDestination(required, pubkeys, output_type, keystore, inner); diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 966ff3fed..b8cc4abbd 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -761,7 +761,7 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); } - CBasicKeyStore keystore; + FillableSigningProvider keystore; const UniValue& keys = request.params[1].get_array(); for (unsigned int idx = 0; idx < keys.size(); ++idx) { UniValue k = keys[idx]; diff --git a/src/rpc/rawtransaction_util.cpp b/src/rpc/rawtransaction_util.cpp index 14fcb628e..9da48da0a 100644 --- a/src/rpc/rawtransaction_util.cpp +++ b/src/rpc/rawtransaction_util.cpp @@ -148,7 +148,7 @@ static void TxInErrorToJSON(const CTxIn& txin, UniValue& vErrorsRet, const std:: vErrorsRet.push_back(entry); } -UniValue SignTransaction(CMutableTransaction& mtx, const UniValue& prevTxsUnival, CBasicKeyStore* keystore, std::map& coins, bool is_temp_keystore, const UniValue& hashType) +UniValue SignTransaction(CMutableTransaction& mtx, const UniValue& prevTxsUnival, FillableSigningProvider* keystore, std::map& coins, bool is_temp_keystore, const UniValue& hashType) { // Add previous txouts given in the RPC call: if (!prevTxsUnival.isNull()) { diff --git a/src/rpc/rawtransaction_util.h b/src/rpc/rawtransaction_util.h index c115d33a7..d198887b9 100644 --- a/src/rpc/rawtransaction_util.h +++ b/src/rpc/rawtransaction_util.h @@ -7,7 +7,7 @@ #include -class CBasicKeyStore; +class FillableSigningProvider; class UniValue; struct CMutableTransaction; class Coin; @@ -24,7 +24,7 @@ class COutPoint; * @param hashType The signature hash type * @returns JSON object with details of signed transaction */ -UniValue SignTransaction(CMutableTransaction& mtx, const UniValue& prevTxs, CBasicKeyStore* keystore, std::map& coins, bool tempKeystore, const UniValue& hashType); +UniValue SignTransaction(CMutableTransaction& mtx, const UniValue& prevTxs, FillableSigningProvider* keystore, std::map& coins, bool tempKeystore, const UniValue& hashType); /** Create a transaction from univalue parameters */ CMutableTransaction ConstructTransaction(const UniValue& inputs_in, const UniValue& outputs_in, const UniValue& locktime, const UniValue& rbf); diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index 65a1b39dd..86f0dd24b 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -131,8 +131,8 @@ CPubKey HexToPubKey(const std::string& hex_in) return vchPubKey; } -// Retrieves a public key for an address from the given CBasicKeyStore -CPubKey AddrToPubKey(CBasicKeyStore* const keystore, const std::string& addr_in) +// Retrieves a public key for an address from the given FillableSigningProvider +CPubKey AddrToPubKey(FillableSigningProvider* const keystore, const std::string& addr_in) { CTxDestination dest = DecodeDestination(addr_in); if (!IsValidDestination(dest)) { @@ -153,7 +153,7 @@ CPubKey AddrToPubKey(CBasicKeyStore* const keystore, const std::string& addr_in) } // Creates a multisig address from a given list of public keys, number of signatures required, and the address type -CTxDestination AddAndGetMultisigDestination(const int required, const std::vector& pubkeys, OutputType type, CBasicKeyStore& keystore, CScript& script_out) +CTxDestination AddAndGetMultisigDestination(const int required, const std::vector& pubkeys, OutputType type, FillableSigningProvider& keystore, CScript& script_out) { // Gather public keys if (required < 1) { diff --git a/src/rpc/util.h b/src/rpc/util.h index b22b4dd54..c7d2c4dad 100644 --- a/src/rpc/util.h +++ b/src/rpc/util.h @@ -19,7 +19,7 @@ #include -class CBasicKeyStore; +class FillableSigningProvider; class CPubKey; class CScript; struct InitInterfaces; @@ -72,8 +72,8 @@ extern std::string HelpExampleCli(const std::string& methodname, const std::stri extern std::string HelpExampleRpc(const std::string& methodname, const std::string& args); CPubKey HexToPubKey(const std::string& hex_in); -CPubKey AddrToPubKey(CBasicKeyStore* const keystore, const std::string& addr_in); -CTxDestination AddAndGetMultisigDestination(const int required, const std::vector& pubkeys, OutputType type, CBasicKeyStore& keystore, CScript& script_out); +CPubKey AddrToPubKey(FillableSigningProvider* const keystore, const std::string& addr_in); +CTxDestination AddAndGetMultisigDestination(const int required, const std::vector& pubkeys, OutputType type, FillableSigningProvider& keystore, CScript& script_out); UniValue DescribeAddress(const CTxDestination& dest); diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp index 93883d1d9..0fc682f76 100644 --- a/src/test/denialofservice_tests.cpp +++ b/src/test/denialofservice_tests.cpp @@ -369,7 +369,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans) { CKey key; key.MakeNewKey(true); - CBasicKeyStore keystore; + FillableSigningProvider keystore; BOOST_CHECK(keystore.AddKey(key)); // 50 orphan transactions: diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp index 11e79937b..8fc36ebc8 100644 --- a/src/test/multisig_tests.cpp +++ b/src/test/multisig_tests.cpp @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(multisig_IsStandard) BOOST_AUTO_TEST_CASE(multisig_Sign) { // Test SignSignature() (and therefore the version of Solver() that signs transactions) - CBasicKeyStore keystore; + FillableSigningProvider keystore; CKey key[4]; for (int i = 0; i < 4; i++) { diff --git a/src/test/script_p2sh_tests.cpp b/src/test/script_p2sh_tests.cpp index 735b67c06..0c701a413 100644 --- a/src/test/script_p2sh_tests.cpp +++ b/src/test/script_p2sh_tests.cpp @@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(sign) // scriptPubKey: HASH160 EQUAL // Test SignSignature() (and therefore the version of Solver() that signs transactions) - CBasicKeyStore keystore; + FillableSigningProvider keystore; CKey key[4]; for (int i = 0; i < 4; i++) { @@ -151,7 +151,7 @@ BOOST_AUTO_TEST_CASE(set) { LOCK(cs_main); // Test the CScript::Set* methods - CBasicKeyStore keystore; + FillableSigningProvider keystore; CKey key[4]; std::vector keys; for (int i = 0; i < 4; i++) @@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard) LOCK(cs_main); CCoinsView coinsDummy; CCoinsViewCache coins(&coinsDummy); - CBasicKeyStore keystore; + FillableSigningProvider keystore; CKey key[6]; std::vector keys; for (int i = 0; i < 6; i++) diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index ae903df0a..c8c2f7783 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -1199,7 +1199,7 @@ SignatureData CombineSignatures(const CTxOut& txout, const CMutableTransaction& BOOST_AUTO_TEST_CASE(script_combineSigs) { // Test the ProduceSignature's ability to combine signatures function - CBasicKeyStore keystore; + FillableSigningProvider keystore; std::vector keys; std::vector pubkeys; for (int i = 0; i < 3; i++) diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 8c1b56ccf..634985abc 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -289,7 +289,7 @@ BOOST_AUTO_TEST_CASE(basic_transaction_tests) // paid to a TX_PUBKEYHASH. // static std::vector -SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsViewCache& coinsRet) +SetupDummyInputs(FillableSigningProvider& keystoreRet, CCoinsViewCache& coinsRet) { std::vector dummyTransactions; dummyTransactions.resize(2); @@ -322,7 +322,7 @@ SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsViewCache& coinsRet) BOOST_AUTO_TEST_CASE(test_Get) { - CBasicKeyStore keystore; + FillableSigningProvider keystore; CCoinsView coinsDummy; CCoinsViewCache coins(&coinsDummy); std::vector dummyTransactions = SetupDummyInputs(keystore, coins); @@ -346,7 +346,7 @@ BOOST_AUTO_TEST_CASE(test_Get) BOOST_CHECK_EQUAL(coins.GetValueIn(CTransaction(t1)), (50+21+22)*CENT); } -static void CreateCreditAndSpend(const CBasicKeyStore& keystore, const CScript& outscript, CTransactionRef& output, CMutableTransaction& input, bool success = true) +static void CreateCreditAndSpend(const FillableSigningProvider& keystore, const CScript& outscript, CTransactionRef& output, CMutableTransaction& input, bool success = true) { CMutableTransaction outputm; outputm.nVersion = 1; @@ -423,7 +423,7 @@ BOOST_AUTO_TEST_CASE(test_big_witness_transaction) CKey key; key.MakeNewKey(true); // Need to use compressed keys in segwit or the signing will fail - CBasicKeyStore keystore; + FillableSigningProvider keystore; BOOST_CHECK(keystore.AddKeyPubKey(key, key.GetPubKey())); CKeyID hash = key.GetPubKey().GetID(); CScript scriptPubKey = CScript() << OP_0 << std::vector(hash.begin(), hash.end()); @@ -507,7 +507,7 @@ SignatureData CombineSignatures(const CMutableTransaction& input1, const CMutabl BOOST_AUTO_TEST_CASE(test_witness) { - CBasicKeyStore keystore, keystore2; + FillableSigningProvider keystore, keystore2; CKey key1, key2, key3, key1L, key2L; CPubKey pubkey1, pubkey2, pubkey3, pubkey1L, pubkey2L; key1.MakeNewKey(true); @@ -682,7 +682,7 @@ BOOST_AUTO_TEST_CASE(test_witness) BOOST_AUTO_TEST_CASE(test_IsStandard) { LOCK(cs_main); - CBasicKeyStore keystore; + FillableSigningProvider keystore; CCoinsView coinsDummy; CCoinsViewCache coins(&coinsDummy); std::vector dummyTransactions = SetupDummyInputs(keystore, coins); diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp index 45c97fa2a..379c84e33 100644 --- a/src/test/txvalidationcache_tests.cpp +++ b/src/test/txvalidationcache_tests.cpp @@ -161,7 +161,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, TestChain100Setup) CScript p2pkh_scriptPubKey = GetScriptForDestination(PKHash(coinbaseKey.GetPubKey())); CScript p2wpkh_scriptPubKey = GetScriptForWitness(p2pkh_scriptPubKey); - CBasicKeyStore keystore; + FillableSigningProvider keystore; BOOST_CHECK(keystore.AddKey(coinbaseKey)); BOOST_CHECK(keystore.AddCScript(p2pk_scriptPubKey)); diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp index dd56ea10a..3070454b1 100644 --- a/src/wallet/crypter.cpp +++ b/src/wallet/crypter.cpp @@ -217,7 +217,7 @@ bool CCryptoKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey) { LOCK(cs_KeyStore); if (!IsCrypted()) { - return CBasicKeyStore::AddKeyPubKey(key, pubkey); + return FillableSigningProvider::AddKeyPubKey(key, pubkey); } if (IsLocked()) { @@ -253,7 +253,7 @@ bool CCryptoKeyStore::HaveKey(const CKeyID &address) const { LOCK(cs_KeyStore); if (!IsCrypted()) { - return CBasicKeyStore::HaveKey(address); + return FillableSigningProvider::HaveKey(address); } return mapCryptedKeys.count(address) > 0; } @@ -262,7 +262,7 @@ bool CCryptoKeyStore::GetKey(const CKeyID &address, CKey& keyOut) const { LOCK(cs_KeyStore); if (!IsCrypted()) { - return CBasicKeyStore::GetKey(address, keyOut); + return FillableSigningProvider::GetKey(address, keyOut); } CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address); @@ -279,7 +279,7 @@ bool CCryptoKeyStore::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) co { LOCK(cs_KeyStore); if (!IsCrypted()) - return CBasicKeyStore::GetPubKey(address, vchPubKeyOut); + return FillableSigningProvider::GetPubKey(address, vchPubKeyOut); CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address); if (mi != mapCryptedKeys.end()) @@ -288,14 +288,14 @@ bool CCryptoKeyStore::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) co return true; } // Check for watch-only pubkeys - return CBasicKeyStore::GetPubKey(address, vchPubKeyOut); + return FillableSigningProvider::GetPubKey(address, vchPubKeyOut); } std::set CCryptoKeyStore::GetKeys() const { LOCK(cs_KeyStore); if (!IsCrypted()) { - return CBasicKeyStore::GetKeys(); + return FillableSigningProvider::GetKeys(); } std::set set_address; for (const auto& mi : mapCryptedKeys) { diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h index 8e195ca8f..95235903f 100644 --- a/src/wallet/crypter.h +++ b/src/wallet/crypter.h @@ -112,7 +112,7 @@ public: /** Keystore which keeps the private keys encrypted. * It derives from the basic key store, which is used if no encryption is active. */ -class CCryptoKeyStore : public CBasicKeyStore +class CCryptoKeyStore : public FillableSigningProvider { private: diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index ef95d0544..cbb05596b 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -488,7 +488,7 @@ static size_t CalculateNestedKeyhashInputSize(bool use_max_sig) CScript script_pubkey = CScript() << OP_HASH160 << std::vector(script_id.begin(), script_id.end()) << OP_EQUAL; // Add inner-script to key store and key to watchonly - CBasicKeyStore keystore; + FillableSigningProvider keystore; keystore.AddCScript(inner_script); keystore.AddKeyPubKey(key, pubkey); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 7b5465c21..3c1d998d1 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1296,7 +1296,7 @@ public: /** * Explicitly make the wallet learn the related scripts for outputs to the * given key. This is purely to make the wallet file compatible with older - * software, as CBasicKeyStore automatically does this implicitly for all + * software, as FillableSigningProvider automatically does this implicitly for all * keys now. */ void LearnRelatedScripts(const CPubKey& key, OutputType);