@@ -722,6 +722,17 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
722722 bool AddWatchOnly (const CScript& dest) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
723723 bool AddWatchOnlyWithDB (WalletBatch &batch, const CScript& dest) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
724724
725+ /* * Add a KeyOriginInfo to the wallet */
726+ bool AddKeyOriginWithDB (WalletBatch& batch, const CPubKey& pubkey, const KeyOriginInfo& info);
727+
728+ // ! Adds a key to the store, and saves it to disk.
729+ bool AddKeyPubKeyWithDB (WalletBatch &batch,const CKey& key, const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
730+
731+ // ! Adds a watch-only address to the store, and saves it to disk.
732+ bool AddWatchOnlyWithDB (WalletBatch &batch, const CScript& dest, int64_t create_time) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
733+
734+ void AddKeypoolPubkeyWithDB (const CPubKey& pubkey, const bool internal, WalletBatch& batch);
735+
725736 /* * Interface for accessing chain state. */
726737 interfaces::Chain& m_chain;
727738
@@ -866,7 +877,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
866877 CPubKey GenerateNewKey (WalletBatch& batch, bool internal = false ) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
867878 // ! Adds a key to the store, and saves it to disk.
868879 bool AddKeyPubKey (const CKey& key, const CPubKey &pubkey) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
869- bool AddKeyPubKeyWithDB (WalletBatch &batch,const CKey& key, const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
870880 // ! Adds a key to the store, without saving it to disk (used by LoadWallet)
871881 bool LoadKey (const CKey& key, const CPubKey &pubkey) { return CCryptoKeyStore::AddKeyPubKey (key, pubkey); }
872882 // ! Load metadata (used by LoadWallet)
@@ -898,7 +908,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
898908
899909 // ! Adds a watch-only address to the store, and saves it to disk.
900910 bool AddWatchOnly (const CScript& dest, int64_t nCreateTime) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
901- bool AddWatchOnlyWithDB (WalletBatch &batch, const CScript& dest, int64_t create_time) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
902911 bool RemoveWatchOnly (const CScript &dest) override EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
903912 // ! Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
904913 bool LoadWatchOnly (const CScript &dest);
@@ -982,6 +991,10 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
982991 bool DummySignTx (CMutableTransaction &txNew, const std::vector<CTxOut> &txouts, bool use_max_sig = false ) const ;
983992 bool DummySignInput (CTxIn &tx_in, const CTxOut &txout, bool use_max_sig = false ) const ;
984993
994+ bool ImportPrivKeys (const std::map<CKeyID, CKey>& privkey_map, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
995+ bool ImportPubKeys (const std::vector<CKeyID>& ordered_pubkeys, const std::map<CKeyID, CPubKey>& pubkey_map, const std::map<CKeyID, KeyOriginInfo>& key_origins, const bool add_keypool, const bool internal, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
996+ bool ImportScriptPubKeys (const std::string& label, const std::set<CScript>& script_pub_keys, const bool have_solving_data, const bool internal, const int64_t timestamp) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
997+
985998 CFeeRate m_pay_tx_fee{DEFAULT_PAY_TX_FEE};
986999 unsigned int m_confirm_target{DEFAULT_TX_CONFIRM_TARGET};
9871000 bool m_spend_zero_conf_change{DEFAULT_SPEND_ZEROCONF_CHANGE};
@@ -1002,7 +1015,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
10021015 size_t KeypoolCountExternalKeys () EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
10031016 bool TopUpKeyPool (unsigned int kpSize = 0 );
10041017 void AddKeypoolPubkey (const CPubKey& pubkey, const bool internal);
1005- void AddKeypoolPubkeyWithDB (const CPubKey& pubkey, const bool internal, WalletBatch& batch);
10061018
10071019 /* *
10081020 * Reserves a key from the keypool and sets nIndex to its index
@@ -1220,9 +1232,6 @@ class CWallet final : public CCryptoKeyStore, private interfaces::Chain::Notific
12201232 /* * Implement lookup of key origin information through wallet key metadata. */
12211233 bool GetKeyOrigin (const CKeyID& keyid, KeyOriginInfo& info) const override ;
12221234
1223- /* * Add a KeyOriginInfo to the wallet */
1224- bool AddKeyOriginWithDB (WalletBatch& batch, const CPubKey& pubkey, const KeyOriginInfo& info);
1225-
12261235 friend struct WalletTestingSetup ;
12271236};
12281237
0 commit comments